Welcome to mirror list, hosted at ThFree Co, Russian Federation.

forever_spec.rb « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 494c0561975c6e6f1aa2f4b18982e9db611040f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require 'spec_helper'

describe Forever do
  describe '.date' do
    subject { described_class.date }

    context 'when using PostgreSQL' do
      it 'should return Postgresql future date' do
        allow(Gitlab::Database).to receive(:postgresql?).and_return(true)

        expect(subject).to eq(described_class::POSTGRESQL_DATE)
      end
    end

    context 'when using MySQL' do
      it 'should return MySQL future date' do
        allow(Gitlab::Database).to receive(:postgresql?).and_return(false)

        expect(subject).to eq(described_class::MYSQL_DATE)
      end
    end
  end
end