From 8152b66ea52909f634fb77092bf383d91017f05c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 20 Dec 2023 20:57:41 +0000 Subject: Adds shoulda for rspec --- spec/models/operation_spec.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'spec/models/operation_spec.rb') diff --git a/spec/models/operation_spec.rb b/spec/models/operation_spec.rb index 1293524..6c59f21 100644 --- a/spec/models/operation_spec.rb +++ b/spec/models/operation_spec.rb @@ -13,6 +13,10 @@ RSpec.describe Operation, type: :model do # end subject { described_class.new(name: "Spuds", organisation: organisation) } + describe "associations" do + it { should belong_to(:organisation).class_name('Organisation') } + end + describe "existence" do it "exists!" do expect(subject).to be_valid -- cgit v1.2.3