menu and menu_category
This commit is contained in:
12
spec/models/menu_spec.rb
Normal file
12
spec/models/menu_spec.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Menu, type: :model do
|
||||
it { should have_many(:menu_categories).dependent(:destroy) }
|
||||
|
||||
it { should validate_presence_of(:name) }
|
||||
it { should validate_presence_of(:is_active) }
|
||||
it { should validate_presence_of(:valid_days) }
|
||||
it { should validate_presence_of(:valid_time_from) }
|
||||
it { should validate_presence_of(:valid_time_to) }
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user