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: b9ffe895bf0ee8ea6d3659c3cef9a66f20c3e6d8 (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 'returns 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 'returns 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