scube-server/spec/models/playlist_spec.rb
Thibault Jouan 33f979b573 Add basic playlists management
* Index of playlists
* Create a new playlist
* Basic playlist model with mandatory name
2011-07-12 00:32:06 +00:00

19 lines
312 B
Ruby

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