More prefabrication

This commit is contained in:
Daniel Waterworth
2019-05-10 11:59:31 +01:00
committed by Robin Ward
parent 54cfc48975
commit bf7594b327
10 changed files with 25 additions and 25 deletions

View File

@@ -41,11 +41,11 @@ describe UserSerializer do
end
context "with a user" do
let(:user) { Fabricate(:user) }
fab!(:user) { Fabricate(:user) }
let(:serializer) { UserSerializer.new(user, scope: Guardian.new, root: false) }
let(:json) { serializer.as_json }
let(:upload) { Fabricate(:upload) }
let(:upload2) { Fabricate(:upload) }
fab!(:upload) { Fabricate(:upload) }
fab!(:upload2) { Fabricate(:upload) }
context "with `enable_names` true" do
before do