Mark track state as not null and add default value
The regular tracks are marked as 'confirmed'
This commit is contained in:
parent
fd93b04f16
commit
0f154d07c9
8 changed files with 32 additions and 13 deletions
|
|
@ -80,6 +80,10 @@ describe Admin::TracksController do
|
|||
it 'creates new track' do
|
||||
expect(Track.find(assigns(:track).id)).to be_a Track
|
||||
end
|
||||
|
||||
it 'the new tracks has the correct attributes' do
|
||||
expect(assigns(:track).state).to eq 'confirmed'
|
||||
end
|
||||
end
|
||||
|
||||
context 'save fails' do
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ FactoryGirl.define do
|
|||
description { Faker::Lorem.sentence }
|
||||
color { Faker::Color.hex_color }
|
||||
short_name { SecureRandom.urlsafe_base64(5) }
|
||||
state 'confirmed'
|
||||
program
|
||||
|
||||
trait :self_organized do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue