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
dff795a8
Commit
dff795a8
authored
Jun 04, 2016
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CE->EE] Fix ES related specs
parent
b3713af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
spec/models/concerns/elastic/note_spec.rb
spec/models/concerns/elastic/note_spec.rb
+13
-10
No files found.
spec/models/concerns/elastic/note_spec.rb
View file @
dff795a8
...
...
@@ -30,23 +30,26 @@ describe "Note", elastic: true do
it
"returns json with all needed elements"
do
note
=
create
:note
expected_hash
=
note
.
attributes
.
extract!
(
expected_hash
_keys
=
[
'id'
,
'note'
,
'project_id'
,
'created_at'
)
'created_at'
,
'issue'
,
'updated_at_sort'
]
expected_hash
[
'updated_at_sort'
]
=
note
.
updated_at
expect
(
note
.
as_indexed_json
).
to
eq
(
expected_hash
)
expect
(
note
.
as_indexed_json
.
keys
).
to
eq
(
expected_hash_keys
)
end
it
"does not create ElasticIndexerWorker job for award or system messages"
do
project
=
create
:empty_project
expect
(
ElasticIndexerWorker
).
not_to
receive
(
:perform_async
)
create
:note
,
:system
,
project:
project
create
:note
,
:award
,
project:
project
project
=
create
:project
issue
=
create
:issue
,
project:
project
# Only issue should be updated
expect
(
ElasticIndexerWorker
).
to
receive
(
:perform_async
).
twice
.
with
(
:update
,
'Issue'
,
anything
,
anything
)
create
:note
,
:system
,
project:
project
,
noteable:
issue
create
:note
,
:award
,
project:
project
,
noteable:
issue
end
context
'notes to confidential issues'
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