Commit 937db37d authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Optimize LFS objects specs

parent 187a5d997cc8
require 'spec_helper'
describe LfsObjectsProject do
subject { create(:lfs_objects_project, project: project) }
let(:project) { create(:project) }
set(:project) { create(:project) }
subject do
create(:lfs_objects_project, project: project)
end
describe 'associations' do
it { is_expected.to belong_to(:project) }
......@@ -11,9 +14,13 @@
describe 'validation' do
it { is_expected.to validate_presence_of(:lfs_object_id) }
it { is_expected.to validate_uniqueness_of(:lfs_object_id).scoped_to(:project_id).with_message("already exists in project") }
it { is_expected.to validate_presence_of(:project_id) }
it 'validates object id' do
is_expected.to validate_uniqueness_of(:lfs_object_id)
.scoped_to(:project_id)
.with_message("already exists in project") }
end
end
describe '#update_project_statistics' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment