Fixed downtime check label colouring

The colours were incorrect: offline was green and online was red,
instead of the opposite.
parent d1da2e81
......@@ -3,8 +3,8 @@ class DowntimeCheck
class Message
attr_reader :path, :offline, :reason
OFFLINE = "\e[32moffline\e[0m"
ONLINE = "\e[31monline\e[0m"
OFFLINE = "\e[31moffline\e[0m"
ONLINE = "\e[32monline\e[0m"
# path - The file path of the migration.
# offline - When set to `true` the migration will require downtime.
......
......@@ -5,13 +5,13 @@
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")
expect(message.to_s).to eq("[\e[31moffline\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")
expect(message.to_s).to eq("[\e[32monline\e[0m]: foo.rb")
end
end
end
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