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
57b67465
Commit
57b67465
authored
Oct 01, 2020
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Subscription URL to point to staging for test and dev env
parent
1f5b0c38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
ee/lib/ee.rb
ee/lib/ee.rb
+5
-1
ee/spec/lib/ee_spec.rb
ee/spec/lib/ee_spec.rb
+42
-0
No files found.
ee/lib/ee.rb
View file @
57b67465
# frozen_string_literal: true
module
EE
SUBSCRIPTIONS_URL
=
ENV
.
fetch
(
'CUSTOMER_PORTAL_URL'
,
'https://customers.gitlab.com'
).
freeze
def
self
.
default_subscriptions_url
::
Gitlab
.
dev_or_test_env?
?
'https://customers.stg.gitlab.com'
:
'https://customers.gitlab.com'
end
SUBSCRIPTIONS_URL
=
ENV
.
fetch
(
'CUSTOMER_PORTAL_URL'
,
default_subscriptions_url
).
freeze
SUBSCRIPTIONS_COMPARISON_URL
=
"https://about.gitlab.com/pricing/gitlab-com/feature-comparison"
.
freeze
SUBSCRIPTIONS_MORE_MINUTES_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_pipeline_minutes"
.
freeze
SUBSCRIPTIONS_MORE_STORAGE_URL
=
"
#{
SUBSCRIPTIONS_URL
}
/buy_storage"
.
freeze
...
...
ee/spec/lib/ee_spec.rb
0 → 100644
View file @
57b67465
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
EE
do
describe
'.default_subscriptions_url'
do
subject
{
EE
.
default_subscriptions_url
}
context
'on non test and non dev environments'
do
before
do
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:test?
).
and_return
(
false
)
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:development?
).
and_return
(
false
)
end
it
'returns production subscriptions app URL'
do
is_expected
.
to
eq
(
'https://customers.gitlab.com'
)
end
end
context
'on dev environment'
do
before
do
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:test?
).
and_return
(
false
)
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:development?
).
and_return
(
true
)
end
it
'returns staging subscriptions app url'
do
is_expected
.
to
eq
(
'https://customers.stg.gitlab.com'
)
end
end
context
'on test environment'
do
before
do
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:test?
).
and_return
(
true
)
allow
(
Rails
).
to
receive_message_chain
(
:env
,
:development?
).
and_return
(
false
)
end
it
'returns staging subscriptions app url'
do
is_expected
.
to
eq
(
'https://customers.stg.gitlab.com'
)
end
end
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