2019-05-02 00:16:49 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-04-30 08:30:15 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2019-05-02 00:16:49 +00:00
|
|
|
describe Gitlab::GraphqlLogger do
|
2019-04-30 08:30:15 +00:00
|
|
|
subject { described_class.new('/dev/null') }
|
|
|
|
let(:now) { Time.now }
|
|
|
|
|
|
|
|
it 'builds a logger once' do
|
|
|
|
expect(::Logger).to receive(:new).and_call_original
|
|
|
|
|
|
|
|
subject.info('hello world')
|
|
|
|
subject.error('hello again')
|
|
|
|
end
|
|
|
|
end
|