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
7f37b273
Commit
7f37b273
authored
Dec 20, 2018
by
Jarka Košanová
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move EE specific spec to the EE namespace
parent
68f90013
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
28 deletions
+39
-28
ee/spec/helpers/ee/issuables_helper_spec.rb
ee/spec/helpers/ee/issuables_helper_spec.rb
+39
-0
spec/helpers/issuables_helper_spec.rb
spec/helpers/issuables_helper_spec.rb
+0
-28
No files found.
ee/spec/helpers/ee/issuables_helper_spec.rb
0 → 100644
View file @
7f37b273
# frozen_string_literal: true
require
'spec_helper'
describe
IssuablesHelper
do
describe
'#issuable_initial_data'
do
it
'returns the correct data for an epic'
do
user
=
create
(
:user
)
epic
=
create
(
:epic
,
author:
user
,
description:
'epic text'
)
@group
=
epic
.
group
allow
(
helper
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
helper
).
to
receive
(
:can?
).
and_return
(
true
)
expected_data
=
{
endpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
"
,
epicLinksEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
/links"
,
updateEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
.json"
,
issueLinksEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
/issues"
,
canUpdate:
true
,
canDestroy:
true
,
canAdmin:
true
,
issuableRef:
"&
#{
epic
.
iid
}
"
,
markdownPreviewPath:
"/groups/
#{
@group
.
full_path
}
/preview_markdown"
,
markdownDocsPath:
'/help/user/markdown'
,
markdownVersion:
CacheMarkdownField
::
CACHE_COMMONMARK_VERSION
,
issuableTemplates:
nil
,
groupPath:
@group
.
path
,
initialTitleHtml:
epic
.
title
,
initialTitleText:
epic
.
title
,
initialDescriptionHtml:
'<p dir="auto">epic text</p>'
,
initialDescriptionText:
'epic text'
,
initialTaskStatus:
'0 of 0 tasks completed'
,
subepicsSupported:
Gitlab
::
Database
.
postgresql?
}
expect
(
helper
.
issuable_initial_data
(
epic
)).
to
eq
(
expected_data
)
end
end
end
spec/helpers/issuables_helper_spec.rb
View file @
7f37b273
...
...
@@ -197,34 +197,6 @@ describe IssuablesHelper do
}
expect
(
helper
.
issuable_initial_data
(
issue
)).
to
eq
(
expected_data
)
end
it
'returns the correct data for an epic'
do
epic
=
create
(
:epic
,
author:
user
,
description:
'epic text'
)
@group
=
epic
.
group
expected_data
=
{
endpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
"
,
epicLinksEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
/links"
,
updateEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
.json"
,
issueLinksEndpoint:
"/groups/
#{
@group
.
full_path
}
/-/epics/
#{
epic
.
iid
}
/issues"
,
canUpdate:
true
,
canDestroy:
true
,
canAdmin:
true
,
issuableRef:
"&
#{
epic
.
iid
}
"
,
markdownPreviewPath:
"/groups/
#{
@group
.
full_path
}
/preview_markdown"
,
markdownDocsPath:
'/help/user/markdown'
,
markdownVersion:
CacheMarkdownField
::
CACHE_COMMONMARK_VERSION
,
issuableTemplates:
nil
,
groupPath:
@group
.
path
,
initialTitleHtml:
epic
.
title
,
initialTitleText:
epic
.
title
,
initialDescriptionHtml:
'<p dir="auto">epic text</p>'
,
initialDescriptionText:
'epic text'
,
initialTaskStatus:
'0 of 0 tasks completed'
,
subepicsSupported:
Gitlab
::
Database
.
postgresql?
?
true
:
false
}
expect
(
helper
.
issuable_initial_data
(
epic
)).
to
eq
(
expected_data
)
end
end
describe
'#selected_labels'
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