Skip to content

Commit

Permalink
test(user-route): update me route test
Browse files Browse the repository at this point in the history
- update 'me' route test

[#137599493]
  • Loading branch information
Ologho Cyril Paul committed Feb 3, 2017
1 parent ba89474 commit 8401570
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions spec/controllers/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@
end

describe "#me" do
let(:user) { valid_user }
context "when it is a valid request", valid_request: true do
it "gets single user information" do
get :me, id: user.id, format: :json
user = User.first
expect(parsed_json['id']).to eq(user.id)
expect(parsed_json['name']).to eq(user.name)
expect(parsed_json['points']).to eq(user.points)
expect(parsed_json['image']).to eq(user.image)
get :me, format: :json
expect(parsed_json['id']).to eq(valid_user.id)
expect(parsed_json['name']).to eq(valid_user.name)
expect(parsed_json['points']).to eq(valid_user.points)
end
end
end
Expand Down

0 comments on commit 8401570

Please sign in to comment.