Skip to content

Commit

Permalink
fix: add pact name back into title of deprecated pacts relation of pr…
Browse files Browse the repository at this point in the history
…ovider pacts resource

#209
  • Loading branch information
bethesque committed May 18, 2018
1 parent 7bd5344 commit f5f002a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/pact_broker/api/decorators/provider_pacts_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ProviderPactsDecorator < BaseDecorator
}
end

# TODO make the title and name consistent with title and name of other resources
links :'pb:pacts' do | context |
represented.collect do | pact |
{
Expand All @@ -35,7 +36,7 @@ class ProviderPactsDecorator < BaseDecorator
represented.collect do | pact |
{
:href => pact_url(context[:base_url], pact),
:title => 'DEPRECATED - please use the pb:pacts relation',
:title => "DEPRECATED - please use the pb:pacts relation. #{pact.name}",
:name => pact.consumer_name
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module Decorators
:name => "Foo" }],
:pacts => [{
:href => "pact_url",
:title => "DEPRECATED - please use the pb:pacts relation",
:title => "DEPRECATED - please use the pb:pacts relation. Pact name",
:name => "Foo"
}
]
Expand Down

0 comments on commit f5f002a

Please sign in to comment.