Skip to content

Commit

Permalink
added test for 'userid=' and 'group_description=' stub methods
Browse files Browse the repository at this point in the history
  • Loading branch information
yrudman committed Jan 9, 2019
1 parent 82e752c commit 23d5df3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/models/miq_report_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,27 @@ def generate_html_row(is_even, tenant_name, formatted_values)
end
end

context "support for saving attributes which are not present in the model" do
let (:report) { FactoryBot.create(:miq_report) }

it "does not raise error when result of #export_to_array used for mass update" do
report_hash = report.export_to_array[0].values.first
expect { MiqReport.new.update_attributes(report_hash) }.not_to raise_error
end

describe "#userid=" do
it "does nothing and used only as stub for mass update" do
expect { report.userid = "something" }.not_to raise_error
end
end

describe "#group_description=" do
it "does nothing and used only as stub for mass update" do
expect { report.group_description = "something" }.not_to raise_error
end
end
end

describe "#column_is_hidden?" do
let(:report) do
MiqReport.new(
Expand Down

0 comments on commit 23d5df3

Please sign in to comment.