Sha256: 4c13bde7cbcdf5e4cd3985db48710346803f8887d25d3c52a9464c6eee544e31
Contents?: true
Size: 836 Bytes
Versions: 14
Compression:
Stored size: 836 Bytes
Contents
require "spec_helper" RSpec.describe "e-BookMobile API", type: :request do describe "/authors" do let(:route) { "/authors" } describe "POST" do let(:request_body) do File.read("spec/support/examples/authors_post_request_body.json") end let(:response_schema) do File.read("spec/support/examples/authors_post_response_schema.json") end let(:output_file) do "spec/contract/output/authors_post_response.json" end it "retrieve a list of authors" do get route File.open(output_file, "w+") {|file| file.puts(JSON.pretty_generate(JSON.parse(response.body))) } expect(response.body).to eql response_body end it "returns status 200" do get route expect(response.status).to eql 200 end end end end
Version data entries
14 entries across 14 versions & 1 rubygems