Add basic playlists management
* Index of playlists * Create a new playlist * Basic playlist model with mandatory name
This commit is contained in:
18
spec/models/playlist_spec.rb
Normal file
18
spec/models/playlist_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Playlist do
|
||||
subject { playlist }
|
||||
let(:playlist) { Playlist.new :name => 'Electro' }
|
||||
|
||||
context "with valid attributes" do
|
||||
it { should be_valid }
|
||||
end
|
||||
|
||||
context "when name empty" do
|
||||
before do
|
||||
playlist.name = ''
|
||||
end
|
||||
|
||||
it { should_not be_valid }
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user