Sha256: ee9a4f3729a2ce909009b335852b08e071737803066a3a3d39446db928afade2
Contents?: true
Size: 848 Bytes
Versions: 28
Compression:
Stored size: 848 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' feature 'Analytics' do describe 'Timing how long completing a questionnaire took' do let(:questionnaire) { Quby.questionnaires.find("simple") } it 'stores the first time the answer was opened' do answer = nil time_opened = Time.new(2014, 4, 1, 12, 23, 32) time_completed = Time.new(2014, 4, 1, 12, 25, 11) Timecop.freeze(time_opened) do answer = visit_new_answer_for(questionnaire) end Timecop.freeze(time_completed) do choose "answer_v_1_a1" click_on "Klaar" expect(page).to have_content("Uw antwoorden zijn opgeslagen") end expect(Quby.answers.reload(answer).started_at).to eq(time_opened) expect(Quby.answers.reload(answer).completed_at).to eq(time_completed) end end end
Version data entries
28 entries across 28 versions & 1 rubygems