Skip to content

Commit 4af4ed1

Browse files
committed
fix: correct :false to false in verification decorator to correctly handle read only property providerName
1 parent b0bb604 commit 4af4ed1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/pact_broker/api/decorators/verification_decorator.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Api
55
module Decorators
66
class VerificationDecorator < BaseDecorator
77

8-
property :provider_name, as: :providerName, writeable: :false
8+
property :provider_name, as: :providerName, writeable: false
99
property :provider_version_number, as: :providerApplicationVersion, writeable: false
1010
property :success
1111
property :execution_date, as: :verificationDate

spec/lib/pact_broker/api/decorators/verification_decorator_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ module Decorators
3434
let(:options) { { user_options: { base_url: 'http://example.org' } } }
3535

3636

37-
subject { JSON.parse VerificationDecorator.new(verification).to_json(options), symbolize_names: true }
37+
let(:json) { VerificationDecorator.new(verification).to_json(options) }
38+
39+
subject { JSON.parse json, symbolize_names: true }
3840

3941
it "includes the success status" do
4042
expect(subject[:success]).to eq true

0 commit comments

Comments
 (0)