Mark track state as not null and add default value

The regular tracks are marked as 'confirmed'
This commit is contained in:
AEtherC0r3 2017-07-15 19:55:45 +03:00 committed by Stella Rouzi
parent fd93b04f16
commit 0f154d07c9
8 changed files with 32 additions and 13 deletions

View file

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

View file

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