add zone test-rspec
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SeatTable, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
# Association test
|
||||
# ensure an item record belongs to a single todo record
|
||||
it { should belong_to(:zone) }
|
||||
# Validation test
|
||||
# ensure column name is present before saving
|
||||
it { should validate_presence_of(:name) }
|
||||
it { should validate_presence_of(:order_by) }
|
||||
it { should validate_presence_of(:created_by) }
|
||||
|
||||
end
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Zone, type: :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
# Association test
|
||||
# ensure Todo model has a 1:m relationship with the Item model
|
||||
it { should have_many(:seat_tables).dependent(:destroy) }
|
||||
# Validation tests
|
||||
# ensure columns title and created_by are present before saving
|
||||
it { should validate_presence_of(:name) }
|
||||
it { should validate_presence_of(:created_by) }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user