diff options
author | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 11:30:52 +0100 |
---|---|---|
committer | Julian Pawlowski <julian.pawlowski@gmail.com> | 2013-02-26 11:30:52 +0100 |
commit | 7c7b788d0d1aa1abe63b3506c4ced555de157fd5 (patch) | |
tree | b19e0056c97eccb910dd8c3c7df9ce76c0c2e47a /test | |
parent | 6c2ba1352010ef4c63b2dad1e90ab8b4366b0195 (diff) | |
parent | ececfdf24075dd4e2794734a07187750b1b33e13 (diff) |
Merge branches 'develop' and 'develop' of https://github.com/amooma/GS5 into develop
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/restore_jobs_controller_test.rb | 49 | ||||
-rw-r--r-- | test/unit/restore_job_test.rb | 7 |
2 files changed, 56 insertions, 0 deletions
diff --git a/test/functional/restore_jobs_controller_test.rb b/test/functional/restore_jobs_controller_test.rb new file mode 100644 index 0000000..bd06b25 --- /dev/null +++ b/test/functional/restore_jobs_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class RestoreJobsControllerTest < ActionController::TestCase + setup do + @restore_job = restore_jobs(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:restore_jobs) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create restore_job" do + assert_difference('RestoreJob.count') do + post :create, restore_job: @restore_job.attributes + end + + assert_redirected_to restore_job_path(assigns(:restore_job)) + end + + test "should show restore_job" do + get :show, id: @restore_job.to_param + assert_response :success + end + + test "should get edit" do + get :edit, id: @restore_job.to_param + assert_response :success + end + + test "should update restore_job" do + put :update, id: @restore_job.to_param, restore_job: @restore_job.attributes + assert_redirected_to restore_job_path(assigns(:restore_job)) + end + + test "should destroy restore_job" do + assert_difference('RestoreJob.count', -1) do + delete :destroy, id: @restore_job.to_param + end + + assert_redirected_to restore_jobs_path + end +end diff --git a/test/unit/restore_job_test.rb b/test/unit/restore_job_test.rb new file mode 100644 index 0000000..ce69ced --- /dev/null +++ b/test/unit/restore_job_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class RestoreJobTest < ActiveSupport::TestCase + def test_should_be_valid + assert RestoreJob.new.valid? + end +end |