Fix syntax in view specs
This commit is contained in:
@@ -11,16 +11,18 @@ describe 'playlists/new.html.haml' do
|
||||
|
||||
it 'renders a form to create a playlist' do
|
||||
render
|
||||
rendered.should have_selector("form[method=post][action='#{playlists_path}']")
|
||||
rendered.should have_selector(
|
||||
"form[method=post][action='#{playlists_path}']"
|
||||
)
|
||||
rendered.should have_selector('input[type=submit]')
|
||||
end
|
||||
|
||||
it 'renders a text field with a label for the playlists name' do
|
||||
playlist.stub(:name => 'Electro')
|
||||
render
|
||||
rendered.should \
|
||||
have_selector("input[type=text][name='playlist[name]'][value=Electro]")
|
||||
rendered.should \
|
||||
have_selector("label[for=playlist_name]", :text => 'Name')
|
||||
rendered.should have_selector(
|
||||
"input[type=text][name='playlist[name]'][value=Electro]"
|
||||
)
|
||||
rendered.should have_selector("label[for=playlist_name]", :text => 'Name')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user