We get rid of database cleaner, and JavaScript tests are faster because between tests we now rollback transactions instead of truncating the database.
14 lines
409 B
Ruby
14 lines
409 B
Ruby
require "rails_helper"
|
|
|
|
describe "Poll Questions" do
|
|
scenario "Lists questions from proposals before regular questions" do
|
|
poll = create(:poll)
|
|
normal_question = create(:poll_question, poll: poll)
|
|
proposal_question = create(:poll_question, proposal: create(:proposal), poll: poll)
|
|
|
|
visit poll_path(poll)
|
|
|
|
expect(proposal_question.title).to appear_before(normal_question.title)
|
|
end
|
|
end
|