Renamed user to defaultAssignee in order to comply with the specification

pull/2551/head
Alexander Bach 10 years ago
parent 41f8f34de5
commit 60cd084c93
  1. 2
      lib/api/v3/categories/category_representer.rb
  2. 6
      spec/lib/api/v3/categories/category_representer_spec.rb

@ -48,7 +48,7 @@ module API
}
end
link :user do
link :defaultAssignee do
{
href: api_v3_paths.user(represented.assigned_to.id),
title: represented.assigned_to.name

@ -61,7 +61,7 @@ describe ::API::V3::Categories::CategoryRepresenter do
it_behaves_like 'category has core values'
it 'should not link to an assignee' do
expect(subject).to_not have_json_path('_links/user')
expect(subject).to_not have_json_path('_links/defaultAssignee')
end
end
@ -72,10 +72,10 @@ describe ::API::V3::Categories::CategoryRepresenter do
it_behaves_like 'category has core values'
it 'should link to its default assignee' do
expect(subject).to have_json_path('_links/user/href')
expect(subject).to have_json_path('_links/defaultAssignee/href')
end
it 'should display the name of its default assignee' do
expect(subject).to have_json_path('_links/user/title')
expect(subject).to have_json_path('_links/defaultAssignee/title')
end
end
end

Loading…
Cancel
Save