Refactor JSON responses expectations in API specs
This commit is contained in:
parent
d1551c62b0
commit
063376a285
@ -13,9 +13,7 @@ describe 'API sign in' do
|
||||
it 'signs the user in with valid credentials' do
|
||||
do_create
|
||||
|
||||
expect(json).to eq({
|
||||
id: user.id
|
||||
})
|
||||
expect(json).to eq(id: user.id)
|
||||
end
|
||||
|
||||
[:email, :password].each do |attr|
|
||||
|
@ -7,7 +7,7 @@ describe 'API application' do
|
||||
before { get api_ping_path, format: :json }
|
||||
|
||||
it 'responds with a pong' do
|
||||
expect(json).to eq({ pong: 'ok' })
|
||||
expect(json).to eq(pong: 'ok')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user