diff --git a/lib/pact_broker/api/decorators/provider_pacts_decorator.rb b/lib/pact_broker/api/decorators/provider_pacts_decorator.rb index 881b901a8..4c8056189 100644 --- a/lib/pact_broker/api/decorators/provider_pacts_decorator.rb +++ b/lib/pact_broker/api/decorators/provider_pacts_decorator.rb @@ -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 | { @@ -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 diff --git a/spec/lib/pact_broker/api/decorators/provider_pacts_decorator_spec.rb b/spec/lib/pact_broker/api/decorators/provider_pacts_decorator_spec.rb index c44409306..d8be5979e 100644 --- a/spec/lib/pact_broker/api/decorators/provider_pacts_decorator_spec.rb +++ b/spec/lib/pact_broker/api/decorators/provider_pacts_decorator_spec.rb @@ -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" } ]