Commit 3e62d6ec authored by Corinna Wiesner's avatar Corinna Wiesner

Remove created at for undecryptable license spec

parent 755a4259
......@@ -849,10 +849,8 @@ RSpec.describe License do
described_class.delete_all
end
let_it_be(:today) { Date.current }
it 'does not include the undecryptable license' do
undecryptable_license = create(:license, created_at: today)
undecryptable_license = create(:license)
allow(undecryptable_license).to receive(:license).and_return(nil)
allow(License).to receive(:all).and_return([undecryptable_license])
......@@ -861,6 +859,7 @@ RSpec.describe License do
end
it 'returns the licenses sorted by created_at, starts_at and expires_at descending' do
today = Date.current
now = Time.current
past_license = create(:license, created_at: now - 1.month, data: build(:gitlab_license, starts_at: today - 1.month, expires_at: today + 11.months).export)
......
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