DRY it out a little
parent
f69c53bf29
commit
3ae20255f6
|
|
@ -19,8 +19,9 @@ describe "Submit API request to create new link" do
|
||||||
}
|
}
|
||||||
post('/create', data.to_json, "CONTENT_TYPE" => "application/json")
|
post('/create', data.to_json, "CONTENT_TYPE" => "application/json")
|
||||||
expect(last_response).to be_ok
|
expect(last_response).to be_ok
|
||||||
expect(JSON.parse(last_response.body)['url']).to eq(data[:url])
|
response_json = JSON.parse(last_response.body)
|
||||||
expect(JSON.parse(last_response.body)['code']).not_to eq(nil)
|
expect(response_json['url']).to eq(data[:url])
|
||||||
|
expect(response_json['code']).not_to eq(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue