Commit 2a58d5e6 authored by Doug Stull's avatar Doug Stull

Move edition tests to model where they belong

- seems the code was moved to the model, but the tests
  weren't in the past...so we'll move them now
- also use build instead of create to reduce db activity
parent 5cd3a67a
...@@ -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