spec/integration_rails/lib/grape/middleware/logger_spec.rb in grape-middleware-logger-1.5.1 vs spec/integration_rails/lib/grape/middleware/logger_spec.rb in grape-middleware-logger-1.6.0

- old
+ new

@@ -43,12 +43,12 @@ end it 'logs all parts of the request' do expect(subject.logger).to receive(:info).with '' expect(subject.logger).to receive(:info).with %Q(Started POST "/api/1.0/users" at #{subject.start_time}) - expect(subject.logger).to receive(:info).with %Q(Processing by TestAPI#users) - expect(subject.logger).to receive(:info).with %Q( Parameters: {"id"=>"101001", "name"=>"foo", "password"=>"[FILTERED]"}) + expect(subject.logger).to receive(:info).with %Q(Processing by TestAPI/users) + expect(subject.logger).to receive(:info).with %Q( Parameters: {"id"=>"101001", "secret"=>"key", "customer"=>[], "name"=>"foo", "password"=>"[FILTERED]"}) expect(subject.logger).to receive(:info).with /Completed 200 in \d+.\d+ms/ expect(subject.logger).to receive(:info).with '' subject.call!(env) end @@ -57,26 +57,26 @@ context 'namespacing' do let(:grape_endpoint) { build(:namespaced_endpoint) } it 'ignores the namespacing' do - expect(subject.processed_by).to eq 'TestAPI#users' + expect(subject.processed_by).to eq 'TestAPI/admin/users' end context 'with more complex route' do let(:grape_endpoint) { build(:namespaced_endpoint, :complex) } it 'only escapes the first slash and leaves the rest of the untouched' do - expect(subject.processed_by).to eq 'TestAPI#users/:name/profile' + expect(subject.processed_by).to eq 'TestAPI/admin/users/:name/profile' end end end context 'with more complex route' do let(:grape_endpoint) { build(:grape_endpoint, :complex) } it 'only escapes the first slash and leaves the rest of the untouched' do - expect(subject.processed_by).to eq 'TestAPI#users/:name/profile' + expect(subject.processed_by).to eq 'TestAPI/users/:name/profile' end end end end