Add track type to admin dashboard
This commit is contained in:
parent
770a63e15c
commit
abc59bb3d7
18 changed files with 252 additions and 2 deletions
21
spec/models/track_type_spec.rb
Normal file
21
spec/models/track_type_spec.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe TrackType do
|
||||
let(:conference) { create(:conference) }
|
||||
let(:track_type) { create(:track_type, program: conference.program) }
|
||||
|
||||
describe 'association' do
|
||||
it { is_expected.to belong_to :program }
|
||||
end
|
||||
|
||||
describe 'validation' do
|
||||
it 'has a valid factory' do
|
||||
expect(build(:track_type)).to be_valid
|
||||
end
|
||||
|
||||
it { is_expected.to validate_presence_of(:title) }
|
||||
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue