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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
cc577b89
Commit
cc577b89
authored
Jul 24, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests for new version of shoulda-matchers
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
eafb03cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
spec/models/notification_setting_spec.rb
spec/models/notification_setting_spec.rb
+6
-1
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+1
-1
spec/models/redirect_route_spec.rb
spec/models/redirect_route_spec.rb
+1
-1
spec/models/route_spec.rb
spec/models/route_spec.rb
+1
-1
No files found.
spec/models/notification_setting_spec.rb
View file @
cc577b89
...
...
@@ -11,7 +11,12 @@ RSpec.describe NotificationSetting, type: :model do
it
{
is_expected
.
to
validate_presence_of
(
:user
)
}
it
{
is_expected
.
to
validate_presence_of
(
:level
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:user_id
).
scoped_to
([
:source_id
,
:source_type
]).
with_message
(
/already exists in source/
)
}
describe
'user_id'
do
before
{
subject
.
user
=
create
(
:user
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:user_id
).
scoped_to
([
:source_type
,
:source_id
]).
with_message
(
/already exists in source/
)
}
end
context
"events"
do
let
(
:user
)
{
create
(
:user
)
}
...
...
spec/models/pages_domain_spec.rb
View file @
cc577b89
...
...
@@ -11,7 +11,7 @@ describe PagesDomain, models: true do
context
'is unique'
do
let
(
:domain
)
{
'my.domain.com'
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:domain
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:domain
)
.
case_insensitive
}
end
{
...
...
spec/models/redirect_route_spec.rb
View file @
cc577b89
...
...
@@ -11,7 +11,7 @@ describe RedirectRoute, models: true do
describe
'validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:source
)
}
it
{
is_expected
.
to
validate_presence_of
(
:path
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:path
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:path
)
.
case_insensitive
}
end
describe
'.matching_path_and_descendants'
do
...
...
spec/models/route_spec.rb
View file @
cc577b89
...
...
@@ -15,7 +15,7 @@ describe Route, models: true do
it
{
is_expected
.
to
validate_presence_of
(
:source
)
}
it
{
is_expected
.
to
validate_presence_of
(
:path
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:path
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:path
)
.
case_insensitive
}
end
describe
'callbacks'
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