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
30aa6420
Commit
30aa6420
authored
Jun 01, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix note validation spec failures
parent
2d084dd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
spec/models/commit_range_spec.rb
spec/models/commit_range_spec.rb
+3
-2
spec/models/note_spec.rb
spec/models/note_spec.rb
+1
-1
No files found.
spec/models/commit_range_spec.rb
View file @
30aa6420
...
...
@@ -151,9 +151,10 @@ describe CommitRange, models: true do
issue
=
create
(
:issue
)
create
(
:note_on_issue
,
noteable
_id:
issue
.
id
,
noteable
:
issue
,
system:
true
,
note:
commit1
.
revert_description
)
note:
commit1
.
revert_description
,
project:
issue
.
project
)
expect_any_instance_of
(
Commit
).
to
receive
(
:reverts_commit?
).
with
(
commit1
).
...
...
spec/models/note_spec.rb
View file @
30aa6420
...
...
@@ -154,7 +154,7 @@ describe Note, models: true do
context
"confidential issues"
do
let
(
:user
)
{
create
:user
}
let
(
:confidential_issue
)
{
create
(
:issue
,
:confidential
,
author:
user
)
}
let
(
:confidential_note
)
{
create
:note
,
note:
"Random"
,
noteable:
confidential_issue
}
let
(
:confidential_note
)
{
create
:note
,
note:
"Random"
,
noteable:
confidential_issue
,
project:
confidential_issue
.
project
}
it
"returns notes with matching content if user can see the issue"
do
expect
(
described_class
.
search
(
confidential_note
.
note
,
as_user:
user
)).
to
eq
([
confidential_note
])
...
...
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