fixes flaky spec
Maybe using `build` instead of `create` was confusing the spec
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Geozone, type: :model do
|
||||
describe Geozone do
|
||||
let(:geozone) { build(:geozone) }
|
||||
|
||||
it "should be valid" do
|
||||
@@ -13,6 +13,8 @@ RSpec.describe Geozone, type: :model do
|
||||
end
|
||||
|
||||
describe "#safe_to_destroy?" do
|
||||
let(:geozone) { create(:geozone) }
|
||||
|
||||
it "is true when not linked to other models" do
|
||||
expect(geozone.safe_to_destroy?).to be_truthy
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user