Updated

spec/models / note_spec.rb

B
22 lines of codes
0 methods
N/A complexity/method
3 churn
42.8 complexity
21 duplications
require 'rails_helper' RSpec.describe Note, type: :model do it "has a valid factory" do expect(FactoryBot.build(:note)).to be_valid end describe "associations" do it { is_expected.to belong_to(:petition).touch(true) } end describe "indexes" do it { is_expected.to have_db_index([:petition_id]).unique } end describe "validations" do
  1. Similar code found in 3 nodes Locations: 0 1 2
subject { FactoryBot.build(:note) } it { is_expected.to validate_presence_of(:petition) } it { is_expected.not_to validate_presence_of(:details) } end end