Remove no longer needed question model tests for valid_answers
This commit is contained in:
@@ -3,13 +3,6 @@ require 'rails_helper'
|
|||||||
RSpec.describe Poll::Question, type: :model do
|
RSpec.describe Poll::Question, type: :model do
|
||||||
let(:poll_question) { build(:poll_question) }
|
let(:poll_question) { build(:poll_question) }
|
||||||
|
|
||||||
describe "#valid_answers" do
|
|
||||||
it "gets a comma-separated string, but returns an array" do
|
|
||||||
poll_question.valid_answers = "Yes, No"
|
|
||||||
expect(poll_question.valid_answers).to eq(["Yes", "No"])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "#poll_question_id" do
|
describe "#poll_question_id" do
|
||||||
it "should be invalid if a poll is not selected" do
|
it "should be invalid if a poll is not selected" do
|
||||||
poll_question.poll_id = nil
|
poll_question.poll_id = nil
|
||||||
@@ -27,7 +20,6 @@ RSpec.describe Poll::Question, type: :model do
|
|||||||
create_list(:geozone, 3)
|
create_list(:geozone, 3)
|
||||||
p = create(:proposal)
|
p = create(:proposal)
|
||||||
poll_question.copy_attributes_from_proposal(p)
|
poll_question.copy_attributes_from_proposal(p)
|
||||||
expect(poll_question.valid_answers).to eq(['Yes', 'No'])
|
|
||||||
expect(poll_question.author).to eq(p.author)
|
expect(poll_question.author).to eq(p.author)
|
||||||
expect(poll_question.author_visible_name).to eq(p.author.name)
|
expect(poll_question.author_visible_name).to eq(p.author.name)
|
||||||
expect(poll_question.proposal_id).to eq(p.id)
|
expect(poll_question.proposal_id).to eq(p.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user