create-json #21
+1
-1
@@ -17,7 +17,7 @@ describe "Submit API request to create new link" do
|
|||||||
data = {
|
data = {
|
||||||
url: 'http://google.com'
|
url: 'http://google.com'
|
||||||
}
|
}
|
||||||
res = 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])
|
expect(JSON.parse(last_response.body)['url']).to eq(data[:url])
|
||||||
expect(JSON.parse(last_response.body)['code']).not_to eq(nil)
|
expect(JSON.parse(last_response.body)['code']).not_to eq(nil)
|
||||||
|
|||||||
Reference in New Issue
Block a user