aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/concerns
AgeCommit message (Collapse)Author
2017-11-24Remove specs we dont need anymorecedricnjanga
2017-11-24Take into account code reviewcedricnjanga
2017-11-23Add spec for stif_netex objectid_formatcedricnjanga
2017-09-11Fix spec error formatLuc Donnet
2017-08-25ErrorFormat: Change collection structureTeddy Wing
These tests were failing: 1) NetexImport POST netex_imports with correct credentials and incorrect request behaves like illegal attributes missing file does not succeed Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty TypeError: no implicit conversion of String into Integer Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:90 # ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]' # ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>' # -e:1:in `<main>' 2) NetexImport POST netex_imports with correct credentials and incorrect request name already taken behaves like illegal attributes missing name does not succeed Failure/Error: expect( json_response_body['errors'][bad_attribute.to_s] ).not_to be_empty TypeError: no implicit conversion of String into Integer Shared Example Group: "illegal attributes" called from ./spec/requests/api/v1/netex_import_spec.rb:96 # ./spec/requests/api/v1/netex_import_spec.rb:77:in `[]' # ./spec/requests/api/v1/netex_import_spec.rb:77:in `block (6 levels) in <top (required)>' # -e:1:in `<main>' The problem was caused by the fact that the error messages come back from `ErrorFormat` as an array of hashes, which contain a single key corresponding to the invalid field. Instead, the error messages should be returned as a single hash with a bunch of keys corresponding to the invalid fields. This change gets the above tests to pass.
2017-08-25ErrorFormat spec: Use `build_stubbed`Teddy Wing
Speed up these tests by using `build_stubbed` for factories where possible.
2017-08-22Refs: #4273@3h;Robert
Debugging Java Integration (ZipService -> HTTPService -> Object Creation) - Created an ErrorFormat concern to see what went wrong in the HTTP call as so many things can go wrong due to: * Timeout Issues * Illegal database setup or cleaning before tests