Commit 17765211 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'move-edition-tests' into 'master'

Move edition tests to model where they belong

See merge request gitlab-org/gitlab!27362
parents 2d308c7d 2a58d5e6
...@@ -145,20 +145,6 @@ describe Gitlab::UsageData do ...@@ -145,20 +145,6 @@ describe Gitlab::UsageData do
end end
end end
describe 'License edition names' do
let(:ultimate) { create(:license, plan: 'ultimate') }
let(:premium) { create(:license, plan: 'premium') }
let(:starter) { create(:license, plan: 'starter') }
let(:old) { create(:license, plan: 'other') }
it 'have expected values' do
expect(ultimate.edition).to eq('EEU')
expect(premium.edition).to eq('EEP')
expect(starter.edition).to eq('EES')
expect(old.edition).to eq('EE')
end
end
describe '#license_usage_data' do describe '#license_usage_data' do
subject { described_class.license_usage_data } subject { described_class.license_usage_data }
......
...@@ -737,6 +737,20 @@ describe License do ...@@ -737,6 +737,20 @@ describe License do
end end
end end
describe '#edition' do
let(:ultimate) { build(:license, plan: 'ultimate') }
let(:premium) { build(:license, plan: 'premium') }
let(:starter) { build(:license, plan: 'starter') }
let(:old) { build(:license, plan: 'other') }
it 'have expected values' do
expect(ultimate.edition).to eq('EEU')
expect(premium.edition).to eq('EEP')
expect(starter.edition).to eq('EES')
expect(old.edition).to eq('EE')
end
end
def set_restrictions(opts) def set_restrictions(opts)
gl_license.restrictions = { gl_license.restrictions = {
active_user_count: opts[:restricted_user_count], active_user_count: opts[:restricted_user_count],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment