blob: 0e1f91fe2f2d5006fbfe716e4db836a5cb338940 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
require "../../../spec_helper"
describe Api::Me::Show do
it "returns the signed in user" do
user = UserFactory.create
response = ApiClient.auth(user).exec(Api::Me::Show)
response.should send_json(200, email: user.email)
end
it "fails if not authenticated" do
response = ApiClient.exec(Api::Me::Show)
response.status_code.should eq(401)
end
end
|