Add dependent destroy to followable.

This commit is contained in:
taitus
2017-07-03 16:05:59 +02:00
committed by Senén Rodero Rodríguez
parent 14ec4f5315
commit 35f7f11177
4 changed files with 21 additions and 6 deletions

View File

@@ -234,6 +234,23 @@ feature 'Users' do
expect(page).to have_content("Sport")
end
scenario 'not show interests when proposal has been destroyed' do
proposal = create(:proposal, tag_list: "Sport")
create(:follow, :followed_proposal, followable: proposal, user: @user)
proposal.destroy
login_as(@user)
visit account_path
check 'account_public_interest'
click_button 'Save changes'
logout
visit user_path(@user)
expect(page).not_to have_content("Sport")
end
scenario 'no visible by default' do
visit user_path(@user)