Sha256: 12aa710b5f5c332b300a0ba39a2d1e56ebe7a1a672a86dd1d8a402fab46cde6b
Contents?: true
Size: 923 Bytes
Versions: 15
Compression:
Stored size: 923 Bytes
Contents
require 'test_helper' class ClarkKent::ReportColumnsControllerTest < ControllerTest include Rails.application.routes.mounted_helpers let(:report) {ClarkKent::Report.first} it "should create a report column" do post clark_kent.report_columns_path(report_column: {report_id: report.id, column_name: 'user_name'}), xhr: true assert_response :success end it "should reject a report column with no column_name" do post clark_kent.report_columns_path(report_column: {report_id: report.id}), xhr: true assert_response :conflict @response.body.must_match /can[^t]*t be blank/ end it "should reject a report column with unusable sort" do post clark_kent.report_columns_path( report_column: { report_id: report.id, column_name: 'user_name', report_sort: 'ascending'} ), xhr: true assert_response :conflict @response.body.must_match 'This column is not sortable.' end end
Version data entries
15 entries across 15 versions & 1 rubygems