Skip to content

Commit

Permalink
feat: change pact rendering log message from warn to info
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Apr 4, 2019
1 parent 82b830c commit 9322910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/pact_broker/api/renderers/html_pact_renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ def html
def consumer_contract
Pact::ConsumerContract.from_json(@json_content)
rescue => e
logger.warn "#{e.class} #{e.message} #{e.backtrace.join("\n")}"
logger.warn "Could not parse the following content to a Pact, showing raw content instead: #{@json_content}"
logger.info "Could not parse the following content to a Pact due to #{e.class} #{e.message}, showing raw content instead: #{@json_content}"
raise NotAPactError
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ module Renderers
end

it "logs a warning" do
allow(logger).to receive(:warn).with(/Error/)
expect(logger).to receive(:warn).with(/Could not parse/)
expect(logger).to receive(:info).with(/Could not parse.*Error/)
subject
end
end
Expand Down

0 comments on commit 9322910

Please sign in to comment.