Sha256: 3ef6176c133546cd0b4e985e4fc5e19dc1f82d614965ce9c19422441107124d3
Contents?: true
Size: 1.22 KB
Versions: 4
Compression:
Stored size: 1.22 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
4 entries across 4 versions & 1 rubygems