fixed build, added debugging info for notification 500s
This commit is contained in:
parent
3c4c62abd5
commit
8796c5b722
3 changed files with 20 additions and 20 deletions
|
|
@ -18,9 +18,9 @@
|
||||||
.span-8.notifications_for_day
|
.span-8.notifications_for_day
|
||||||
- notes.each do |note|
|
- notes.each do |note|
|
||||||
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"}
|
.stream_element{:data=>{:guid => note.id}, :class => "#{note.unread ? 'unread' : ''}"}
|
||||||
- if note.type == "Notifications::StartedSharing"
|
- if note.type == "Notifications::StartedSharing" && contact = current_user.contact_for(note.target)
|
||||||
.right
|
.right
|
||||||
= render 'contacts/aspect_dropdown', :contact => current_user.contact_for(note.target), :person => note.target, :hang => 'left'
|
= render 'contacts/aspect_dropdown', :contact => contact, :person => note.target, :hang => 'left'
|
||||||
|
|
||||||
%span.from
|
%span.from
|
||||||
= notification_people_link(note)
|
= notification_people_link(note)
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,24 @@ describe AdminsController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#generate_new_token' do
|
||||||
|
before do
|
||||||
|
AppConfig[:admins] = [@user.username]
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'generates a new token for the current user' do
|
||||||
|
lambda {
|
||||||
|
get 'generate_new_token'
|
||||||
|
}.should change{ @user.reload.authentication_token }
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'displays a token' do
|
||||||
|
get 'generate_new_token'
|
||||||
|
get :user_search
|
||||||
|
response.body.should include(@user.reload.authentication_token)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#admin_inviter' do
|
describe '#admin_inviter' do
|
||||||
context 'admin signed in' do
|
context 'admin signed in' do
|
||||||
|
|
|
||||||
|
|
@ -138,22 +138,4 @@ describe UsersController do
|
||||||
assigns[:email_prefs]['mentioned'].should be_false
|
assigns[:email_prefs]['mentioned'].should be_false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#generate_new_token' do
|
|
||||||
before do
|
|
||||||
AppConfig[:admins] = [@user.username]
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'generates a new token for the current user' do
|
|
||||||
lambda {
|
|
||||||
get 'generate_new_token'
|
|
||||||
}.should change{ @user.reload.authentication_token }
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'displays a token' do
|
|
||||||
get 'generate_new_token'
|
|
||||||
response.body.should include(@user.reload.authentication_token)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue