mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-05 15:11:01 -05:00
tests for restoring conversations
This commit is contained in:
@@ -25,10 +25,10 @@
|
||||
.row
|
||||
.col-md-1
|
||||
- if @box == 'trash'
|
||||
= link_to conversation_path(conversation, box: @box), method: :put do
|
||||
= link_to conversation_path(conversation, box: @box), method: :put, class: 'restore' do
|
||||
= icon 'fas', 'trash-restore'
|
||||
- else
|
||||
= link_to delete_icon, conversation_path(conversation, box: @box), method: :delete, class: 'text-danger'
|
||||
= link_to delete_icon, conversation_path(conversation, box: @box), method: :delete, class: 'delete text-danger'
|
||||
.col-md-11
|
||||
.text-right.float-right
|
||||
- conversation.recipients.each do |member|
|
||||
|
||||
@@ -19,6 +19,24 @@ describe "Notifications", :js do
|
||||
it { Percy.snapshot(page, name: 'conversations#index') }
|
||||
|
||||
describe 'deleting' do
|
||||
before do
|
||||
# delete button
|
||||
click_link class: 'delete'
|
||||
end
|
||||
|
||||
describe 'view trash' do
|
||||
before { click_link 'trash' }
|
||||
it { expect(page).to have_content 'something i want to say' }
|
||||
describe 'restore conversation' do
|
||||
before { click_link class: 'restore' }
|
||||
it { expect(page).not_to have_content 'something i want to say' }
|
||||
|
||||
describe 'conversation was restored' do
|
||||
before { click_link 'inbox' }
|
||||
it { expect(page).to have_content 'something i want to say' }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user