Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
ef6155948234
Commit
937db37d
authored
Sep 05, 2017
by
Grzegorz Bizon
Browse files
Optimize LFS objects specs
parent
187a5d997cc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
spec/models/lfs_objects_project_spec.rb
View file @
ef615594
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
...
...
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