Sha256: 4defa7e96ec6336ae16f577b940acb8f75f374b1e3143515145a9e6b267a96fe
Contents?: true
Size: 549 Bytes
Versions: 9
Compression:
Stored size: 549 Bytes
Contents
When(/^request creation of an auton with an existing type$/) do class EmptyAuton include StructureMapper::Hash attribute foo: String end @auton_type="EmptyAuton" post '/autons', {auton_type: @auton_type}.to_json, 'Content-Type' => 'application/json' end Then(/^the API should respond with status code (\d+) and auton's ID$/) do |expected_status| expect(last_response.status).to be(expected_status.to_i) response = JSON.parse(last_response.body) expect(response).not_to be_empty expect(response).to have_key('auton_id') end
Version data entries
9 entries across 9 versions & 1 rubygems