fixes specs
This commit is contained in:
@@ -175,8 +175,7 @@ feature 'Admin polls' do
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
|
||||
click_link "Questions (1)"
|
||||
|
||||
expect(page).to have_content "Questions (1)"
|
||||
expect(page).to have_content question.title
|
||||
expect(page).to_not have_content other_question.title
|
||||
expect(page).to_not have_content "There are no questions assigned to this poll"
|
||||
@@ -187,10 +186,8 @@ feature 'Admin polls' do
|
||||
question = create(:poll_question, poll: nil, title: 'Should we rebuild the city?')
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
within('#poll-resources') do
|
||||
click_link 'Questions (0)'
|
||||
end
|
||||
|
||||
expect(page).to have_content 'Questions (0)'
|
||||
expect(page).to have_content 'There are no questions assigned to this poll'
|
||||
|
||||
fill_in 'search-questions', with: 'rebuild'
|
||||
@@ -203,10 +200,8 @@ feature 'Admin polls' do
|
||||
expect(page).to have_content 'Question added to this poll'
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
within('#poll-resources') do
|
||||
click_link 'Questions (1)'
|
||||
end
|
||||
|
||||
expect(page).to have_content 'Questions (1)'
|
||||
expect(page).to_not have_content 'There are no questions assigned to this poll'
|
||||
expect(page).to have_content question.title
|
||||
end
|
||||
@@ -216,10 +211,8 @@ feature 'Admin polls' do
|
||||
question = create(:poll_question, poll: poll)
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
within('#poll-resources') do
|
||||
click_link 'Questions (1)'
|
||||
end
|
||||
|
||||
expect(page).to have_content 'Questions (1)'
|
||||
expect(page).to_not have_content 'There are no questions assigned to this poll'
|
||||
expect(page).to have_content question.title
|
||||
|
||||
@@ -230,10 +223,8 @@ feature 'Admin polls' do
|
||||
expect(page).to have_content 'Question removed from this poll'
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
within('#poll-resources') do
|
||||
click_link 'Questions (0)'
|
||||
end
|
||||
|
||||
expect(page).to have_content 'Questions (0)'
|
||||
expect(page).to have_content 'There are no questions assigned to this poll'
|
||||
expect(page).to_not have_content question.title
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user