Skip to content

Commit d423df7

Browse files
committed
Fixed issue with broken test
1 parent 5b4066c commit d423df7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/services/api/v1/deserialization/identifier_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,15 @@
9696
identifiable: @identifiable, json: json)
9797
expect(result).to eql(nil)
9898
end
99-
it "returns the existing Identifier for the IdentifierScheme" do
99+
it "returns the updated Identifier for the IdentifierScheme" do
100100
identifier = create(:identifier, identifier_scheme: @scheme,
101101
identifiable: @identifiable,
102102
value: Faker::Number.number)
103103
result = described_class.send(:identifier_for_scheme,
104104
scheme: @scheme,
105105
identifiable: @identifiable, json: @json)
106-
validate_identifier(result: result, scheme: @scheme, value: identifier.value)
106+
expected = "#{@scheme.identifier_prefix}#{@json[:identifier]}"
107+
validate_identifier(result: result, scheme: @scheme, value: expected)
107108
expect(result.id).to eql(identifier.id)
108109
end
109110
end

0 commit comments

Comments
 (0)