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