@@ -90,15 +90,15 @@ module Matrix
90
90
91
91
context "when there is not a version for the tag" do
92
92
93
- let ( :selectors ) { [ { pacticipant_name : "Foo" , latest_tag : "wiffle" } , { pacticipant_name : "Bar" , pacticipant_version_number : "2" } ] }
93
+ let ( :selectors ) { [ { pacticipant_name : "Foo" , latest : true , tag : "wiffle" } , { pacticipant_name : "Bar" , pacticipant_version_number : "2" } ] }
94
94
95
95
it "returns an error message" do
96
96
expect ( subject ) . to eq [ "No version of Foo found with tag wiffle" ]
97
97
end
98
98
end
99
99
end
100
100
101
- context "when the latest_tag is used as well as a version" do
101
+ context "when the latest is used as well as a version" do
102
102
before do
103
103
td . create_pacticipant ( "Foo" )
104
104
. create_version ( "1" )
@@ -107,10 +107,26 @@ module Matrix
107
107
. create_version ( "2" )
108
108
end
109
109
110
- let ( :selectors ) { [ { pacticipant_name : "Foo" , pacticipant_version_number : "1" , latest_tag : "prod" } , { pacticipant_name : "Bar" , pacticipant_version_number : "2" } ] }
110
+ let ( :selectors ) { [ { pacticipant_name : "Foo" , pacticipant_version_number : "1" , latest : true } , { pacticipant_name : "Bar" , pacticipant_version_number : "2" } ] }
111
111
112
112
it "returns an error message" do
113
- expect ( subject ) . to eq [ "A version and a latest tag cannot both be specified for Foo" ]
113
+ expect ( subject ) . to eq [ "A version and latest flag cannot both be specified for Foo" ]
114
+ end
115
+ end
116
+
117
+ context "when a tag is specified without latest=true" do
118
+ before do
119
+ td . create_pacticipant ( "Foo" )
120
+ . create_version ( "1" )
121
+ . create_tag ( "prod" )
122
+ . create_pacticipant ( "Bar" )
123
+ . create_version ( "2" )
124
+ end
125
+
126
+ let ( :selectors ) { [ { pacticipant_name : "Foo" , tag : "1" } ] }
127
+
128
+ it "returns an error message" do
129
+ expect ( subject ) . to eq [ "Querying for all versions with a tag is not currently supported. The latest=true flag must be specified when a tag is given." ]
114
130
end
115
131
end
116
132
end
0 commit comments