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)
describe 'associations' do
it { belong_to(:project) }
......@@ -11,9 +14,13 @@
describe 'validation' do
it { validate_presence_of(:lfs_object_id) }
it { validate_uniqueness_of(:lfs_object_id).scoped_to(:project_id).with_message("already exists in project") }
it { validate_presence_of(:project_id) }
it 'validates object id' do validate_uniqueness_of(:lfs_object_id)
.with_message("already exists in project") }
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