mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
fixing tests
This commit is contained in:
parent
68f9dedcbd
commit
cc82f74525
2 changed files with 7 additions and 3 deletions
|
|
@ -17,7 +17,9 @@ class AttemptsController < ApplicationController
|
|||
responded_at: Time.new,
|
||||
twilio_details: twilio_params.to_h.to_yaml
|
||||
)
|
||||
render plain: "We've registered your response of #{attempt.response}. To see how others responded to the same question please visit"
|
||||
render plain: """We've registered your response of #{attempt.response}.
|
||||
To see how others responded to the same question please visit
|
||||
#{school_category_url(attempt.recipient.school, attempt.question.category)}"""
|
||||
end
|
||||
|
||||
# # GET /attempts/1/edit
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ RSpec.describe AttemptsController, type: :controller do
|
|||
|
||||
let(:schedule) { Schedule.new }
|
||||
let(:school) { School.create!(name: 'School') }
|
||||
let(:recipient) { Recipient.create!(name: 'Recipient', phone: '+11231231234') }
|
||||
let(:recipient) { school.recipients.create!(name: 'Recipient', phone: '+11231231234') }
|
||||
let(:recipient_schedule) { RecipientSchedule.new }
|
||||
let(:category) { Category.create!(name: 'Category') }
|
||||
let(:question) { create_questions(1, category).first }
|
||||
|
|
@ -48,7 +48,9 @@ RSpec.describe AttemptsController, type: :controller do
|
|||
|
||||
it "sends back a message" do
|
||||
post :twilio, params: twilio_attributes
|
||||
expect(response.body).to eq('Thank you!')
|
||||
expect(response.body).to eq """We\'ve registered your response of Option 0:1 C.
|
||||
To see how others responded to the same question please visit
|
||||
http://test.host/schools/school/categories/category"""
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue