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

message_spec.rb « downtime_check « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 93094cda776f03f3e7b31a629c8b59f20192fc5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'spec_helper'

describe Gitlab::DowntimeCheck::Message do
  describe '#to_s' do
    it 'returns an ANSI formatted String for an offline migration' do
      message = described_class.new('foo.rb', true, 'hello')

      expect(message.to_s).to eq("[\e[32moffline\e[0m]: foo.rb: hello")
    end

    it 'returns an ANSI formatted String for an online migration' do
      message = described_class.new('foo.rb')

      expect(message.to_s).to eq("[\e[31monline\e[0m]: foo.rb")
    end
  end
end