Skip to content
Extraits de code Groupes Projets
Valider a12ca511 rédigé par Steffen van Bergerem's avatar Steffen van Bergerem
Parcourir les fichiers

Convert close mentioned account cuke

parent 226f1bbf
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -16,22 +16,3 @@ Feature: Close account
When I try to sign in manually
Then I should be on the new user session page
And I should see a flash message with a warning
Scenario: post display should not throw error when mention is removed for the user whose account is closed
Given following users exist:
| username | email |
| Bob Jones | bob@bob.bob |
| Alice Smith | alice@alice.alice |
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
And Alice has a post mentioning Bob
Then I sign in as "bob@bob.bob"
When I go to the users edit page
And I follow "close_account"
And I put in my password in "close_account_password" in the modal window
And I press "close_account_confirm" in the modal window
And I confirm the alert
Then I should be on the new user session page
When I sign in as "alice@alice.alice"
And I am on the home page
Then I should see "Bob Jones"
......@@ -30,6 +30,17 @@ describe PostsController, :type => :controller do
expect(response).to be_success
end
it 'succeeds after removing a mention when closing the mentioned user\'s account' do
user = FactoryGirl.create(:user, :username => "user")
alice.share_with(user.person, alice.aspects.first)
msg = alice.build_post :status_message, text: "Mention @{User ; #{user.diaspora_handle}}", :public => true, :to => 'all'
msg.save!
expect(msg.mentioned_people.count).to eq(1)
user.destroy
get :show, "id" => msg.id
expect(response).to be_success
end
it 'renders the application layout on mobile' do
get :show, :id => @message.id, :format => :mobile
expect(response).to render_template('layouts/application')
......
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