Sha256: 0e718a7d736c1ba7a7529dabd51419ba05c4969f9f6dbb63d4ec977ce3ad093a
Contents?: true
Size: 1.17 KB
Versions: 16
Compression:
Stored size: 1.17 KB
Contents
require 'test_helper' module EasyReports class ReportsControllerTest < ActionController::TestCase setup do @report = reports(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:reports) end test "should get new" do get :new assert_response :success end test "should create report" do assert_difference('Report.count') do post :create, report: { description: @report.description, title: @report.title } end assert_redirected_to report_path(assigns(:report)) end test "should show report" do get :show, id: @report assert_response :success end test "should get edit" do get :edit, id: @report assert_response :success end test "should update report" do patch :update, id: @report, report: { description: @report.description, title: @report.title } assert_redirected_to report_path(assigns(:report)) end test "should destroy report" do assert_difference('Report.count', -1) do delete :destroy, id: @report end assert_redirected_to reports_path end end end
Version data entries
16 entries across 16 versions & 1 rubygems