Sha256: fcf8c335e8fc4b6fbadc8eef1871927727ebce8cc7952fff808755d72e360d32

Contents?: true

Size: 678 Bytes

Versions: 9

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

feature 'Short text question management' do
  let!(:survey) { create :survey }
  let!(:version) { survey.versions.create version: 0 }
  let!(:question_group) { version.question_groups.create title: 'Abakadabara' }
  let!(:question) { create :short_text_question, question_group: question_group }

  scenario 'edits a question' do
    visit edit_survey_version_question_group_questions_short_text_path(survey, version, question_group, question)

    fill_in 'Default value', with: 'Hey Hey!'
    check 'Required'

    click_button 'Save'

    expect(question.reload.default_value).to eq 'Hey Hey!'
    expect(question.reload.required).to eq true
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
helena_administration-1.0.3 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-1.0.2 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-1.0.1 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-1.0.0 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-0.3.4 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-0.3.3 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-0.3.1 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-0.3.0 spec/features/questions/question_types/manage_short_text_question_spec.rb
helena_administration-0.2.3 spec/features/questions/question_types/manage_short_text_question_spec.rb