2016-09-08 10:25:33 -05:00
|
|
|
# frozen_string_literal: true
|
2016-08-17 17:49:09 -05:00
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class AdminControllerTest < ActionDispatch::IntegrationTest
|
2016-08-18 15:35:17 -05:00
|
|
|
test "dashboard should require auth" do
|
|
|
|
get admin_url
|
|
|
|
assert_redirected_to admin_login_url
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get dashboard" do
|
|
|
|
post admin_auth_url, params: { auth:
|
|
|
|
{ email: 'alan.admin@mailinator.com', password: 'password' } }
|
|
|
|
get admin_url
|
|
|
|
assert_response :success
|
|
|
|
end
|
2016-08-17 17:49:09 -05:00
|
|
|
end
|