Skip to content

Instantly share code, notes, and snippets.

@pjanik
Created May 23, 2014 13:33
Show Gist options
  • Save pjanik/320d2ab508235e7663e2 to your computer and use it in GitHub Desktop.
Save pjanik/320d2ab508235e7663e2 to your computer and use it in GitHub Desktop.
Failures:
1) Activity is run from the portal with a domain, external_id, and return url
Failure/Error: stub.should have_been_requested
The request POST http://portal.org/return/1234 with body "[{\"type\":\"open_response\",\"question_id\":\"1\",\"answer\":\"something\"}]" with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was expected to execute 1 time but it executed 0 times
The following requests were made:
GET http://127.0.0.1:54627/__identify__ with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'} was made 7 times
POST http://portal.org/return/1234 with body '[{"type":"open_response","question_id":"14","answer":"something"}]' with headers {'Authorization'=>'Bearer token', 'Content-Type'=>'application/json'} was made 1 time
============================================================
# ./spec/features/activity_run_from_portal_spec.rb:29:in `block (2 levels) in <top (required)>'
2) Embeddable::MultipleChoice#check when the MultipleChoice is not multi-answer should return a MultipleChoiceChoice instance
Failure/Error: multichoice.check('1').should be_a_kind_of Embeddable::MultipleChoiceChoice
ActiveRecord::RecordNotFound:
Couldn't find Embeddable::MultipleChoiceChoice with id=1 [WHERE "embeddable_multiple_choice_choices"."multiple_choice_id" = 13]
# ./app/models/embeddable/multiple_choice.rb:27:in `parse_choices'
# ./app/models/embeddable/multiple_choice.rb:36:in `check'
# ./spec/models/embeddable/multiple_choice_question_spec.rb:68:in `block (4 levels) in <top (required)>'
3) Embeddable::MultipleChoice#check when the MultipleChoiceChoice is multi-answer should return a hash with at least one key
Failure/Error: multichoice.check('1').should be_a_kind_of Hash
ActiveRecord::RecordNotFound:
Couldn't find Embeddable::MultipleChoiceChoice with id=1 [WHERE "embeddable_multiple_choice_choices"."multiple_choice_id" = 13]
# ./app/models/embeddable/multiple_choice.rb:27:in `parse_choices'
# ./app/models/embeddable/multiple_choice.rb:36:in `check'
# ./spec/models/embeddable/multiple_choice_question_spec.rb:85:in `block (4 levels) in <top (required)>'
Finished in 25.67 seconds
578 examples, 3 failures, 4 pending
Failed examples:
rspec ./spec/features/activity_run_from_portal_spec.rb:6 # Activity is run from the portal with a domain, external_id, and return url
rspec ./spec/models/embeddable/multiple_choice_question_spec.rb:67 # Embeddable::MultipleChoice#check when the MultipleChoice is not multi-answer should return a MultipleChoiceChoice instance
rspec ./spec/models/embeddable/multiple_choice_question_spec.rb:84 # Embeddable::MultipleChoice#check when the MultipleChoiceChoice is multi-answer should return a hash with at least one key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment