Add basic playlists management

* Index of playlists
* Create a new playlist
* Basic playlist model with mandatory name
This commit is contained in:
Thibault Jouan
2011-07-09 09:23:32 +00:00
parent 74fb4ca86f
commit 33f979b573
13 changed files with 205 additions and 57 deletions

View File

@@ -0,0 +1,22 @@
require 'spec_helper'
describe 'playlists/index.html.haml' do
before do
assign :playlists, [
double('Playlist', :name => 'Foo'),
double('Playlist', :name => 'Bar')
]
end
it 'displays a list of playlists' do
render
rendered.should have_selector('ul>li', :count => 2)
rendered.should have_selector('ul>li', :text => 'Foo')
rendered.should have_selector('ul>li+li', :text => 'Bar')
end
it 'displays a link to create a new playlist' do
render
rendered.should have_selector('a', :text => 'Create playlist')
end
end