I get a json response from my server.
{
"@type": "res",
"createdAt": "2014-07-24T15:26:49",
"description": "test",
"disabled": false
}
How can i test whether the response
is right
or wrong
. Below is my test case.
it "can find an account that this user belongs to" do
Account.find(id: @acc.id, authorization: @token);
expect(response.status).to eq 200
expect(response.body).to eq({
"@type": "res",
"createdAt": "2014-07-24T15:26:49",
"description": "test",
"disabled": false
})
end
When i try to execute the test, it throws me a lot of syntax error.