Sha256: 32e30a8ae5268d7113e1f0c2ecafe84712da6214f254099945f21ceb264b43f1
Contents?: true
Size: 680 Bytes
Versions: 9
Compression:
Stored size: 680 Bytes
Contents
require 'test_helper' module Knock class AuthTokenControllerTest < ActionController::TestCase setup do @routes = Engine.routes end def user @user ||= users(:one) end test "responds with 404 if user does not exist" do post :create, auth: { email: 'wrong@example.net', password: '' } assert_response :not_found end test "responds with 404 if password is invalid" do post :create, auth: { email: user.email, password: 'wrong' } assert_response :not_found end test "responds with 201" do post :create, auth: { email: user.email, password: 'secret' } assert_response :created end end end
Version data entries
9 entries across 9 versions & 1 rubygems