Adds poll name on admin poll questions index
This commit is contained in:
@@ -12,13 +12,22 @@ feature 'Admin poll questions' do
|
||||
%w[title]
|
||||
|
||||
scenario 'Index' do
|
||||
question1 = create(:poll_question)
|
||||
question2 = create(:poll_question)
|
||||
poll1 = create(:poll)
|
||||
poll2 = create(:poll)
|
||||
question1 = create(:poll_question, poll: poll1)
|
||||
question2 = create(:poll_question, poll: poll2)
|
||||
|
||||
visit admin_questions_path
|
||||
|
||||
expect(page).to have_content(question1.title)
|
||||
expect(page).to have_content(question2.title)
|
||||
within("#poll_question_#{question1.id}") do
|
||||
expect(page).to have_content(question1.title)
|
||||
expect(page).to have_content(poll1.name)
|
||||
end
|
||||
|
||||
within("#poll_question_#{question2.id}") do
|
||||
expect(page).to have_content(question2.title)
|
||||
expect(page).to have_content(poll2.name)
|
||||
end
|
||||
end
|
||||
|
||||
scenario 'Show' do
|
||||
|
||||
Reference in New Issue
Block a user