Sha256: 51d161475a858567f7c0af1ce6b6c5ac62c38e3c8dfcf5fdfb034f479ec4a405
Contents?: true
Size: 832 Bytes
Versions: 21
Compression:
Stored size: 832 Bytes
Contents
require 'spec/support/provider_state_builder' describe "Get versions" do let(:path) { "/pacticipants/Consumer/versions" } let(:last_response_body) { JSON.parse(subject.body, symbolize_names: true) } subject { get path; last_response } context "when the pacticipant exists" do before do ProviderStateBuilder.new .create_consumer("Consumer") .create_consumer_version("1.0.0") .create_consumer_version("1.0.1") end it "returns a 200 response" do expect(subject.status).to be 200 end it "returns a list of links to the versions" do expect(last_response_body[:_links][:"versions"].size).to eq 2 end end context "when the pacticipant does not exist" do it "returns a 404 response" do expect(subject).to be_a_404_response end end end
Version data entries
21 entries across 21 versions & 1 rubygems