Skip to content
Extraits de code Groupes Projets
Valider 8796c5b7 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

fixed build, added debugging info for notification 500s

parent 3c4c62ab
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -18,9 +18,9 @@
.span-8.notifications_for_day
- notes.each do |note|
.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
= 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
= notification_people_link(note)
......
......@@ -58,6 +58,24 @@ describe AdminsController do
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
context 'admin signed in' do
......
......@@ -138,22 +138,4 @@ describe UsersController do
assigns[:email_prefs]['mentioned'].should be_false
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
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter