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
Boxiang Sun
gitlab-ce
Commits
53aa0437
Commit
53aa0437
authored
Feb 21, 2017
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs for the ghost user feature.
parent
6fdb17cb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
spec/models/abuse_report_spec.rb
spec/models/abuse_report_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+4
-2
No files found.
spec/models/abuse_report_spec.rb
View file @
53aa0437
...
@@ -2,7 +2,7 @@ require 'rails_helper'
...
@@ -2,7 +2,7 @@ require 'rails_helper'
RSpec
.
describe
AbuseReport
,
type: :model
do
RSpec
.
describe
AbuseReport
,
type: :model
do
subject
{
create
(
:abuse_report
)
}
subject
{
create
(
:abuse_report
)
}
let
(
:user
)
{
create
(
:
user
)
}
let
(
:user
)
{
create
(
:
admin
)
}
it
{
expect
(
subject
).
to
be_valid
}
it
{
expect
(
subject
).
to
be_valid
}
...
...
spec/models/user_spec.rb
View file @
53aa0437
...
@@ -211,13 +211,15 @@ describe User, models: true do
...
@@ -211,13 +211,15 @@ describe User, models: true do
describe
'ghost users'
do
describe
'ghost users'
do
it
'does not allow a non-blocked ghost user'
do
it
'does not allow a non-blocked ghost user'
do
user
=
build
(
:user
,
:ghost
,
state: :active
)
user
=
build
(
:user
,
:ghost
)
user
.
state
=
'active'
expect
(
user
).
to
be_invalid
expect
(
user
).
to
be_invalid
end
end
it
'allows a blocked ghost user'
do
it
'allows a blocked ghost user'
do
user
=
build
(
:user
,
:ghost
,
state: :blocked
)
user
=
build
(
:user
,
:ghost
)
user
.
state
=
'blocked'
expect
(
user
).
to
be_valid
expect
(
user
).
to
be_valid
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