Commit 28301fe1 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'rs-issue-232' into 'master'

Allow licenses to meet the user limit exactly

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/232

See merge request !147
parents adbce04c 9f643ea2
......@@ -102,7 +102,7 @@ class License < ActiveRecord::Base
return unless active_user_count
return if active_user_count < restricted_user_count
return if active_user_count <= restricted_user_count
overage = active_user_count - restricted_user_count
......
......@@ -79,6 +79,15 @@ describe License do
expect(license).to be_valid
end
end
context "when the active user count is met exactly" do
it "is valid" do
active_user_count = 100
gl_license.restrictions = { active_user_count: active_user_count }
expect(license).to be_valid
end
end
end
describe "Not expired" do
......
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