debian-mirror-gitlab/spec/lib/api/entities/design_management/design_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
474 B
Ruby
Raw Normal View History

2020-05-24 23:13:21 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe API::Entities::DesignManagement::Design do
2020-05-24 23:13:21 +05:30
let_it_be(:design) { create(:design) }
2021-04-29 21:17:54 +05:30
2020-05-24 23:13:21 +05:30
let(:entity) { described_class.new(design, request: double) }
subject { entity.as_json }
it 'has the correct attributes' do
expect(subject).to eq({
id: design.id,
project_id: design.project_id,
filename: design.filename,
image_url: ::Gitlab::UrlBuilder.build(design)
})
end
end