spec/mongoid/association/referenced/belongs_to/proxy_spec.rb in mongoid-7.2.4 vs spec/mongoid/association/referenced/belongs_to/proxy_spec.rb in mongoid-7.2.5
- old
+ new
@@ -1330,6 +1330,23 @@
it "sets the new document on the relation" do
expect(game.person).to eq(person_two)
end
end
end
+
+ describe "#method_missing" do
+ let!(:person) do
+ Person.create
+ end
+
+ let!(:game) do
+ Game.create(person: person)
+ end
+
+ it 'handles keyword args' do
+ expect do
+ game.person.set_personal_data(ssn: '123', age: 25)
+ end.not_to raise_error
+ end
+
+ end
end