@@ -21,25 +21,25 @@ module Pacts
21
21
22
22
subject { Content . from_hash ( pact_hash ) . with_ids }
23
23
24
- context "when the interaction has an existing id " do
25
- let ( :interaction ) { { "id " => "blah" , "foo" => "bar" } }
24
+ context "when the interaction has an existing _id " do
25
+ let ( :interaction ) { { "_id " => "blah" , "foo" => "bar" } }
26
26
27
- it "removes the id before creating the sha" do
27
+ it "removes the i_d before creating the sha" do
28
28
expect ( GenerateInteractionSha ) . to receive ( :call ) . with ( "foo" => "bar" )
29
29
subject
30
30
end
31
31
end
32
32
33
33
context "when the interaction is a hash" do
34
- it "adds ids to the interactions " do
35
- expect ( subject . interactions . first [ "id " ] ) . to eq "some-id"
34
+ it "adds an _id to each interaction " do
35
+ expect ( subject . interactions . first [ "_id " ] ) . to eq "some-id"
36
36
end
37
37
end
38
38
39
39
context "when the interaction is not a hash" do
40
40
let ( :interaction ) { 1 }
41
41
42
- it "does not add an id " do
42
+ it "does not add an _id " do
43
43
expect ( subject . interactions . first ) . to eq interaction
44
44
end
45
45
end
@@ -55,8 +55,8 @@ module Pacts
55
55
}
56
56
end
57
57
58
- it "adds ids to the messages " do
59
- expect ( subject . messages . first [ "id " ] ) . to eq "some-id"
58
+ it "adds an _id to each message " do
59
+ expect ( subject . messages . first [ "_id " ] ) . to eq "some-id"
60
60
end
61
61
end
62
62
end
0 commit comments