Sha256: ec3006c91c2b4690dd26f0e2aa89d7361c3eeee5645f04c8c48bbe79a9aa1e65

Contents?: true

Size: 603 Bytes

Versions: 17

Compression:

Stored size: 603 Bytes

Contents

require 'spec_helper'

describe CaseblocksAPI::BucketResults do

  Given(:client){ FakeHttpParty.new }
  Given(:update_case){ CaseblocksAPI::UpdateCase.new(client) }
  Given(:updated_params){ {:current_state => 'yagni' } }
  Given(:case_type){'tyre_shopper_orders'}
  Given(:singular_case_type){'tyre_shopper_orders'.singularize }
  Given(:id){ 'a_id' }
  When{ update_case.execute(case_type, id, updated_params)  }
  Then{ expect(client.requested_url).to eql "/case_blocks/#{singular_case_type}/#{id}" }
  Then{ expect(client.params).to eql({body: {tyre_shopper_order: updated_params}.to_json }) }
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
caseblocks_api-0.2.20 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.19 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.18 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.17 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.16 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.15 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.14 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.13 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.12 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.11 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.9 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.8 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.6 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.5 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.4 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.3 spec/lib/caseblocks_api/update_case_spec.rb
caseblocks_api-0.2.2 spec/lib/caseblocks_api/update_case_spec.rb