Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
937db37d
Commit
937db37d
authored
Sep 05, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimize LFS objects specs
parent
3142b361
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
spec/models/lfs_objects_project_spec.rb
spec/models/lfs_objects_project_spec.rb
+11
-4
No files found.
spec/models/lfs_objects_project_spec.rb
View file @
937db37d
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 LfsObjectsProject do
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment