admin interface generation
This commit is contained in:
21
test/controllers/admin/auth_controller_test.rb
Normal file
21
test/controllers/admin/auth_controller_test.rb
Normal file
@ -0,0 +1,21 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Admin
|
||||
class AuthControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get login" do
|
||||
get admin_url
|
||||
assert_response :success
|
||||
assert_template 'admin/auth/login'
|
||||
end
|
||||
|
||||
test "should get auth" do
|
||||
post admin_auth_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get logout" do
|
||||
get admin_logout_url
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
35
test/controllers/admin/question_controller_test.rb
Normal file
35
test/controllers/admin/question_controller_test.rb
Normal file
@ -0,0 +1,35 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Admin
|
||||
class QuestionControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get index" do
|
||||
get admin_questions_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get admin_new_question_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post create" do
|
||||
post admin_create_question_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get view" do
|
||||
get admin_question_url questions(:fed5).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get admin_edit_question_url questions(:fed5).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post update question" do
|
||||
post admin_update_question_url questions(:fed5).to_i
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
35
test/controllers/admin/quiz_controller_test.rb
Normal file
35
test/controllers/admin/quiz_controller_test.rb
Normal file
@ -0,0 +1,35 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Admin
|
||||
class QuizControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get index" do
|
||||
get admin_quizzes_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get admin_new_quiz_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post create" do
|
||||
post admin_create_quiz_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get view" do
|
||||
get admin_quiz_url quizzes(:fed).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get admin_edit_quiz_url quizzes(:fed).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post update quiz" do
|
||||
post admin_update_quiz_url quizzes(:fed).to_i
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
35
test/controllers/admin/user_controller_test.rb
Normal file
35
test/controllers/admin/user_controller_test.rb
Normal file
@ -0,0 +1,35 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Admin
|
||||
class UserControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get index" do
|
||||
get admin_users_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get admin_new_user_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post create" do
|
||||
post admin_create_user_url
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get view" do
|
||||
get admin_user_url users(:recruiter).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get admin_edit_user_url users(:recruiter).to_i
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should post update user" do
|
||||
post admin_update_user_url users(:recruiter).to_i
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
end
|
4
test/controllers/admin_controller_test.rb
Normal file
4
test/controllers/admin_controller_test.rb
Normal file
@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class AdminControllerTest < ActionDispatch::IntegrationTest
|
||||
end
|
Reference in New Issue
Block a user