Add to Budget Budget::Heading Budget::Group specs the sluggable shared example
Why: * Those classes have a slug attribute that needs to be filled How: * Just adding the shared example to Budget model spec, and creating the model spec file for Heading and Group to include it as well
This commit is contained in:
7
spec/models/budget/group_spec.rb
Normal file
7
spec/models/budget/group_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
describe Budget::Group do
|
||||||
|
|
||||||
|
it_behaves_like "sluggable"
|
||||||
|
|
||||||
|
end
|
||||||
7
spec/models/budget/heading_spec.rb
Normal file
7
spec/models/budget/heading_spec.rb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
describe Budget::Heading do
|
||||||
|
|
||||||
|
it_behaves_like "sluggable"
|
||||||
|
|
||||||
|
end
|
||||||
@@ -2,6 +2,8 @@ require 'rails_helper'
|
|||||||
|
|
||||||
describe Budget do
|
describe Budget do
|
||||||
|
|
||||||
|
it_behaves_like "sluggable"
|
||||||
|
|
||||||
describe "description" do
|
describe "description" do
|
||||||
it "changes depending on the phase" do
|
it "changes depending on the phase" do
|
||||||
budget = create(:budget)
|
budget = create(:budget)
|
||||||
|
|||||||
Reference in New Issue
Block a user