Sha256: 9293c6cd1efe1c7d175905983e2b8318a67c9413e8c5865b1c38f661be09056f
Contents?: true
Size: 947 Bytes
Versions: 33
Compression:
Stored size: 947 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' feature 'saving a question which key clashes with its parent option', js: true do let(:questionnaire) { Quby.questionnaires.find('subquestion_key_clash') } scenario 'saving should have the value end up in the raw params and in the value itself' do answer = create_new_answer_for(questionnaire) visit_new_answer_for(questionnaire, 'paged', answer) choose 'answer_v_0_a1' fill_in 'answer[v_0_a1]', with: 'clashing' click_on 'Klaar' expect(page).to have_content("Bedankt voor het invullen van deze vragenlijst. Uw antwoorden zijn opgeslagen.") answer = Quby.send(:answer_repo).send(:all_records, 'subquestion_key_clash').last expect(answer.raw_params).to include( "aborted" => false, "v_0" => "a1", "v_0_a1" => "clashing" ) expect(answer.value).to eq("v_0" => "a1", 'v_0_a1' => 'clashing') end end
Version data entries
33 entries across 33 versions & 1 rubygems