debian-mirror-gitlab/spec/lib/forever_spec.rb

24 lines
582 B
Ruby
Raw Normal View History

2018-05-09 12:01:36 +05:30
require 'spec_helper'
describe Forever do
describe '.date' do
subject { described_class.date }
context 'when using PostgreSQL' do
2019-05-18 00:54:41 +05:30
it 'returns Postgresql future date' do
2018-05-09 12:01:36 +05:30
allow(Gitlab::Database).to receive(:postgresql?).and_return(true)
2018-11-20 20:47:30 +05:30
2018-05-09 12:01:36 +05:30
expect(subject).to eq(described_class::POSTGRESQL_DATE)
end
end
context 'when using MySQL' do
2019-05-18 00:54:41 +05:30
it 'returns MySQL future date' do
2018-05-09 12:01:36 +05:30
allow(Gitlab::Database).to receive(:postgresql?).and_return(false)
2018-11-20 20:47:30 +05:30
2018-05-09 12:01:36 +05:30
expect(subject).to eq(described_class::MYSQL_DATE)
end
end
end
end