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
0945fa04
Commit
0945fa04
authored
May 11, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure hasSHAChanged == true when setData includes a different SHA from constructor
parent
f19ec4e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js
.../javascripts/vue_mr_widget/stores/mr_widget_store_spec.js
+22
-0
No files found.
spec/javascripts/vue_mr_widget/stores/mr_widget_store_spec.js
0 → 100644
View file @
0945fa04
import
MergeRequestStore
from
'
~/vue_merge_request_widget/stores/mr_widget_store
'
;
import
mockData
from
'
../mock_data
'
;
describe
(
'
MergeRequestStore
'
,
()
=>
{
describe
(
'
setData
'
,
()
=>
{
let
store
;
beforeEach
(()
=>
{
store
=
new
MergeRequestStore
(
mockData
);
});
it
(
'
should set hasSHAChanged when the diff SHA changes
'
,
()
=>
{
store
.
setData
({
...
mockData
,
diff_head_sha
:
'
a-different-string
'
});
expect
(
store
.
hasSHAChanged
).
toBe
(
true
);
});
it
(
'
should not set hasSHAChanged when other data changes
'
,
()
=>
{
store
.
setData
({
...
mockData
,
work_in_progress
:
!
mockData
.
work_in_progress
});
expect
(
store
.
hasSHAChanged
).
toBe
(
false
);
});
});
});
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