BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3a0b9e06
Unverified
Commit
3a0b9e06
authored
Jul 24, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust tests to work with latest shoulda gem
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cc577b89
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
list_spec.rb
spec/models/list_spec.rb
+0
-6
notification_setting_spec.rb
spec/models/notification_setting_spec.rb
+3
-1
user_spec.rb
spec/models/user_spec.rb
+3
-1
No files found.
spec/models/list_spec.rb
View file @
3a0b9e06
...
...
@@ -13,12 +13,6 @@ describe List do
it
{
is_expected
.
to
validate_presence_of
(
:position
)
}
it
{
is_expected
.
to
validate_numericality_of
(
:position
).
only_integer
.
is_greater_than_or_equal_to
(
0
)
}
it
'validates uniqueness of label scoped to board_id'
do
create
(
:list
)
expect
(
subject
).
to
validate_uniqueness_of
(
:label_id
).
scoped_to
(
:board_id
)
end
context
'when list_type is set to closed'
do
subject
{
described_class
.
new
(
list_type: :closed
)
}
...
...
spec/models/notification_setting_spec.rb
View file @
3a0b9e06
...
...
@@ -13,7 +13,9 @@ RSpec.describe NotificationSetting, type: :model do
it
{
is_expected
.
to
validate_presence_of
(
:level
)
}
describe
'user_id'
do
before
{
subject
.
user
=
create
(
:user
)
}
before
do
subject
.
user
=
create
(
:user
)
end
it
{
is_expected
.
to
validate_uniqueness_of
(
:user_id
).
scoped_to
([
:source_type
,
:source_id
]).
with_message
(
/already exists in source/
)
}
end
...
...
spec/models/user_spec.rb
View file @
3a0b9e06
...
...
@@ -114,7 +114,9 @@ describe User, models: true do
end
it
'validates uniqueness'
do
expect
(
subject
).
to
validate_uniqueness_of
(
:username
).
case_insensitive
user
=
build
(
:user
)
expect
(
user
).
to
validate_uniqueness_of
(
:username
).
case_insensitive
end
end
...
...
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