add zone test-rspec

This commit is contained in:
Min Zeya Phyo
2017-03-24 21:28:57 +06:30
parent 3ec71e85fe
commit a247cd44eb
19 changed files with 108 additions and 4 deletions

View File

@@ -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