File tree 2 files changed +24
-1
lines changed
lib/pact_broker/api/resources
spec/lib/pact_broker/api/resources
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,12 @@ def allowed_methods
24
24
end
25
25
26
26
def resource_exists?
27
- !!verification
27
+ if identifier_from_path [ :verification_number ] == "all"
28
+ set_json_error_message ( "To see all the verifications for a pact, use the Matrix page" )
29
+ false
30
+ else
31
+ !!verification
32
+ end
28
33
end
29
34
30
35
def to_json
Original file line number Diff line number Diff line change
1
+ require 'pact_broker/api/resources/verification'
2
+
3
+ module PactBroker
4
+ module Api
5
+ module Resources
6
+ describe Verification do
7
+ context "when someone tries to get all the verifications for a pact" do
8
+ subject { get ( "/pacts/provider/Bar/consumer/Foo/pact-version/1/verification-results/all" ) }
9
+
10
+ it "tells them to use the matrix" do
11
+ expect ( subject . status ) . to eq 404
12
+ expect ( subject . body ) . to include "Matrix"
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
You can’t perform that action at this time.
0 commit comments