Files
old-holivud2/spec/models/releasable_param_spec.rb
2020-05-31 22:38:19 +02:00

22 lines
695 B
Ruby

require "rails_helper"
RSpec.describe ReleasableParam do
describe "#id" do
it "returns id from first releasable param" do
expect(described_class.new({location_release_id: 1, talent_release_id: 4, another: "param"}).id).to eq 1
end
end
describe "#name" do
it "returns name from first releasable param" do
expect(described_class.new({location_release_id: 1, talent_release_id: 4, another: "param"}).name).to eq "location_release"
end
end
describe "#type" do
it "returns type from first releasable param" do
expect(described_class.new({location_release_id: 1, talent_release_id: 4, another: "param"}).type).to eq LocationRelease
end
end
end