From af572acb3ac95ff2f1c73f82e433e684f7af46f7 Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Thu, 7 Sep 2017 09:25:20 +1000 Subject: [PATCH] test: add test for tagging pacticipant version --- spec/features/tag_version_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 spec/features/tag_version_spec.rb diff --git a/spec/features/tag_version_spec.rb b/spec/features/tag_version_spec.rb new file mode 100644 index 000000000..fc52c3c8b --- /dev/null +++ b/spec/features/tag_version_spec.rb @@ -0,0 +1,13 @@ +describe "tagging a pacticipant version" do + let(:path) { "/pacticipants/Foo/versions/1.2.3/tags/feat%2Fbar" } + + subject { put path,nil, {'CONTENT_TYPE' => 'application/json'}; last_response } + + context "when the pacticipant/version/tag do not exist" do + it "creates a tag" do + expect{ subject }.to change { + PactBroker::Domain::Tag.where(name: 'feat/bar').count + }.by(1) + end + end +end