-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow version to be created with tags
- Loading branch information
Showing
8 changed files
with
125 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe "Creating a tag" do | ||
let(:path) { "/pacticipants/Foo/versions/1234/tags/foo" } | ||
let(:headers) { { 'CONTENT_TYPE' => 'application/json' } } | ||
let(:response_body) { JSON.parse(subject.body, symbolize_names: true)} | ||
|
||
subject { put(path, {}, headers) } | ||
|
||
it "returns a 201 response" do | ||
expect(subject.status).to be 201 | ||
end | ||
|
||
it "returns a HAL JSON Content Type" do | ||
expect(subject.headers['Content-Type']).to eq 'application/hal+json;charset=utf-8' | ||
end | ||
|
||
it "returns the newly created tag" do | ||
expect(response_body).to include name: "foo" | ||
end | ||
|
||
context "when the tag already exists" do | ||
before do | ||
td.subtract_day | ||
.create_consumer("Foo") | ||
.create_consumer_version("1234") | ||
.create_consumer_version_tag("foo") | ||
end | ||
|
||
it "returns a 200 response" do | ||
expect(subject.status).to be 200 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters