wikicr/spec/requests/api/me/show_spec.cr
Arthur Poulet e9bb1cbdc0
Some checks failed
continuous-integration/drone/push Build is failing
spike: try to install & migrate to lucky
2021-10-15 18:44:23 +02:00

18 lines
377 B
Crystal

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