discourse/spec/serializers/category_upload_serializer_spec.rb
Daniel Waterworth e219588142 DEV: Prefabrication (test optimization) (#7414)
* Introduced fab!, a helper that creates database state for a group

It's almost identical to let_it_be, except:

 1. It creates a new object for each test by default,
 2. You can disable it using PREFABRICATION=0
2019-05-07 13:12:20 +10:00

16 lines
341 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
describe CategoryUploadSerializer do
fab!(:upload) { Fabricate(:upload) }
let(:subject) { described_class.new(upload, root: false) }
it 'should include width and height' do
expect(subject.width).to eq(upload.width)
expect(subject.height).to eq(upload.height)
end
end