spec/rest/consumers_spec.rb in finapps-5.0.7 vs spec/rest/consumers_spec.rb in finapps-5.0.8
- old
+ new
@@ -21,13 +21,11 @@
context 'for valid params' do
let(:create) { subject.create(email: 'email', password: 'password') }
it { expect { create }.not_to raise_error }
- it('results is a Hash') do
- expect(results).to be_a(Hash)
- end
+ it('results is a Hash') { expect(results).to be_a(Hash) }
it('performs a post and returns the response') do
expect(results).to have_key(:public_id)
end
it('error_messages array is empty') { expect(error_messages).to eq([]) }
end
@@ -57,13 +55,11 @@
let(:show) { subject.show(:valid_public_id) }
let(:results) { show[0] }
let(:error_messages) { show[1] }
it { expect { show }.not_to raise_error }
- it('results is a Hash') do
- expect(results).to be_a(Hash)
- end
+ it('results is a Hash') { expect(results).to be_a(Hash) }
it('performs a get and returns the response') do
expect(results).to have_key(:public_id)
end
it('error_messages array is empty') { expect(error_messages).to eq([]) }
end
@@ -129,12 +125,10 @@
end
let(:results) { update[0] }
let(:error_messages) { update[1] }
it { expect { update }.not_to raise_error }
- it('results is a Hash') do
- expect(results).to be_a(Hash)
- end
+ it('results is a Hash') { expect(results).to be_a(Hash) }
it('the public_id is on the results') do
expect(results).to have_key(:public_id)
end
it('the new token is on the results') do
expect(results).to have_key(:token)