Sha256: ed8d58ace9f12f19d1b5f58c3ac23509dd977cfb92589528fb7d6f8924a8c834
Contents?: true
Size: 756 Bytes
Versions: 19
Compression:
Stored size: 756 Bytes
Contents
# frozen_string_literal: true require "spec_helper" module Decidim module Surveys describe SurveyForm do let!(:survey) { create(:survey) } let!(:survey_question) { create(:survey_question, survey: survey) } subject do described_class.from_model(survey).with_context(current_feature: survey.feature) end it "builds empty answers for each question" do expect(subject.answers.length).to eq(1) end context "when tos_agreement is not accepted" do it { is_expected.not_to be_valid } end context "when tos_agreement is not accepted" do before do subject.tos_agreement = true end it { is_expected.to be_valid } end end end end
Version data entries
19 entries across 19 versions & 1 rubygems