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
cf63e25b
Commit
cf63e25b
authored
Aug 06, 2020
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing ApplicationHelper specs for promo URLs
parent
38d58208
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+24
-1
No files found.
spec/helpers/application_helper_spec.rb
View file @
cf63e25b
...
...
@@ -168,15 +168,38 @@ RSpec.describe ApplicationHelper do
it
{
expect
(
helper
.
active_when
(
false
)).
to
eq
(
nil
)
}
end
describe
'#promo_host'
do
subject
{
helper
.
promo_host
}
it
'returns the url'
do
is_expected
.
to
eq
(
'about.gitlab.com'
)
end
end
describe
'#promo_url'
do
subject
{
helper
.
promo_url
}
it
'returns the url'
do
is_expected
.
to
eq
(
'https://about.gitlab.com'
)
end
it
'changes if promo_host changes'
do
allow
(
helper
).
to
receive
(
:promo_host
).
and_return
(
'foobar.baz'
)
is_expected
.
to
eq
(
'https://foobar.baz'
)
end
end
describe
'#contact_sales_url'
do
subject
{
helper
.
contact_sales_url
}
it
'
passes a smoke test
'
do
it
'
returns the url
'
do
is_expected
.
to
eq
(
'https://about.gitlab.com/sales'
)
end
it
'changes if promo_url changes'
do
allow
(
helper
).
to
receive
(
:promo_url
).
and_return
(
'https://somewhere.else'
)
is_expected
.
to
eq
(
'https://somewhere.else/sales'
)
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