Skip to content

Instantly share code, notes, and snippets.

@thirtysixthspan
Created January 11, 2016 20:50
Show Gist options
  • Save thirtysixthspan/c79fcc7c29ad649deed9 to your computer and use it in GitHub Desktop.
Save thirtysixthspan/c79fcc7c29ad649deed9 to your computer and use it in GitHub Desktop.
Failures:
1) AuditLocationService locations doesn't include reported locations
Failure/Error: expect(audit_location_service.locations(audit.id, options)[0].length)
expected: 2
got: 4
(compared using ==)
# ./spec/coefficient/audit_location_service_spec.rb:243:in `block (3 levels) in <top (required)>'
2) Importer resets all repositories
Failure/Error: expect(model.find_all).to be_empty
NoMethodError:
undefined method `find_all' for #<Coef::DocumentApiRepository::ActionItemRepository:0x007fd4a080aaf8>
# ./lib/coefficient/models/repository_extensions.rb:29:in `find_all'
# ./spec/coefficient/importer_spec.rb:31:in `block (3 levels) in <module:Coef>'
# ./spec/coefficient/importer_spec.rb:30:in `each'
# ./spec/coefficient/importer_spec.rb:30:in `block (2 levels) in <module:Coef>'
3) Importer imports with a company and location imported imports notes for that location
Failure/Error: note = Note.where(title: 'Test Note').first
NoMethodError:
undefined method `each_pair' for #<Array:0x007fd49b05dfa8>
# ./lib/coefficient/repository/api/document_api/base_repository.rb:105:in `hash_to_object'
# ./lib/coefficient/repository/api/document_api/note_repository.rb:57:in `hash_to_object'
# ./lib/coefficient/repository/api/document_api/base_repository.rb:96:in `block in response_list_to_objects'
# ./lib/coefficient/repository/api/document_api/base_repository.rb:96:in `each'
# ./lib/coefficient/repository/api/document_api/base_repository.rb:96:in `map'
# ./lib/coefficient/repository/api/document_api/base_repository.rb:96:in `response_list_to_objects'
# ./lib/coefficient/repository/api/document_api/base_repository.rb:57:in `filter_by'
# ./lib/coefficient/models/repository_extensions.rb:25:in `where'
# ./spec/coefficient/importer_spec.rb:172:in `block (4 levels) in <module:Coef>'
4) /action_items list list action items by assignee
Failure/Error: expect(JSON.parse(last_response.body).size).to eq(4)
expected: 4
got: 3
(compared using ==)
# ./spec/functional/action_items_spec.rb:340:in `block (3 levels) in <top (required)>'
5) /action_items list list action items by location
Failure/Error: expect(action_items.size).to eq(4)
expected: 4
got: 3
(compared using ==)
# ./spec/functional/action_items_spec.rb:348:in `block (3 levels) in <top (required)>'
6) field audit endpoints create sets the correct items
Failure/Error: expect(field_audit.items).to eq(field_audit_items)
expected: [{"id"=>"baf40b73-3140-495e-ae58-1093ca4bfeef", "title"=>"Item One", "type"=>"pass_fail", "files"=>[]}, {"id"=>"5a8c5729-22ff-4d11-8300-bf88bb48b9d2", "title"=>"Item Two", "type"=>"pass_fail", "files"=>[]}]
got: [{"id"=>"baf40b73-3140-495e-ae58-1093ca4bfeef"}, {"id"=>"5a8c5729-22ff-4d11-8300-bf88bb48b9d2"}]
(compared using ==)
Diff:
@@ -1,9 +1,3 @@
-[{"id"=>"baf40b73-3140-495e-ae58-1093ca4bfeef",
- "title"=>"Item One",
- "type"=>"pass_fail",
- "files"=>[]},
- {"id"=>"5a8c5729-22ff-4d11-8300-bf88bb48b9d2",
- "title"=>"Item Two",
- "type"=>"pass_fail",
- "files"=>[]}]
+[{"id"=>"baf40b73-3140-495e-ae58-1093ca4bfeef"},
+ {"id"=>"5a8c5729-22ff-4d11-8300-bf88bb48b9d2"}]
# ./spec/functional/field_audits_spec.rb:93:in `block (3 levels) in <top (required)>'
7) field audit endpoints create sets the correct sections
Failure/Error: expect(field_audit.sections).to eq(field_audit_sections)
expected: [{"id"=>"c00c93fb-a34d-4677-b37b-9653ad3d7f16", "title"=>"Section", "items"=>[{"id"=>"a8959486-f411-43ba-b855-fa06da87e12b", "title"=>"Item One", "type"=>"pass_fail", "files"=>[]}, {"id"=>"ff5ebb9f-b39a-48b5-8dc6-16c0116cfd3d", "title"=>"Item Two", "type"=>"pass_fail", "files"=>[]}]}]
got: nil
(compared using ==)
# ./spec/functional/field_audits_spec.rb:97:in `block (3 levels) in <top (required)>'
Finished in 9 minutes 14 seconds (files took 1.36 seconds to load)
670 examples, 7 failures
Failed examples:
rspec ./spec/coefficient/audit_location_service_spec.rb:210 # AuditLocationService locations doesn't include reported locations
rspec ./spec/coefficient/importer_spec.rb:27 # Importer resets all repositories
rspec ./spec/coefficient/importer_spec.rb:168 # Importer imports with a company and location imported imports notes for that location
rspec ./spec/functional/action_items_spec.rb:336 # /action_items list list action items by assignee
rspec ./spec/functional/action_items_spec.rb:343 # /action_items list list action items by location
rspec ./spec/functional/field_audits_spec.rb:92 # field audit endpoints create sets the correct items
rspec ./spec/functional/field_audits_spec.rb:96 # field audit endpoints create sets the correct sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment