22 lines
695 B
Ruby
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
|