@ -78,6 +78,11 @@ module API
query.starred
}
property :name,
getter: ->(*) {
query.name
date_time_property :created_at
date_time_property :updated_at
@ -93,6 +93,14 @@ describe ::API::V3::Views::ViewRepresenter, 'rendering' do
end
describe 'name' do
context 'with the query being name' do
it_behaves_like 'property', :name do
let(:value) { query.name }
describe 'timestamps' do
it_behaves_like 'datetime property', :createdAt do
let(:value) { view.created_at }