- assert_select "div#content", :count => 1 do
- assert_select "h1", :text => /Edit diary entry/, :count => 1
- assert_select "form[action='/diary_entry/#{diary_entries(:normal_user_entry_1).id}/edit'][method=post]", :count => 1 do
- assert_select "input#diary_entry_title[name='diary_entry[title]'][value='#{diary_entries(:normal_user_entry_1).title}']", :count => 1
- assert_select "textarea#diary_entry_body[name='diary_entry[body]']", :text => diary_entries(:normal_user_entry_1).body, :count => 1
- assert_select "select#diary_entry_language_code", :count => 1
- assert_select "input#latitude[name='diary_entry[latitude]']", :count => 1
- assert_select "input#longitude[name='diary_entry[longitude]']", :count => 1
- assert_select "input[name=commit][type=submit][value=Save]", :count => 1
- assert_select "input", :count => 5
+ assert_select "div.wrapper", :count => 1 do
+ assert_select "div.content-heading", :count => 1 do
+ assert_select "h1", :text => /Edit diary entry/, :count => 1
+ end
+ assert_select "div#content", :count => 1 do
+ assert_select "form[action='/user/#{entry.user.display_name}/diary/#{entry.id}/edit'][method=post]", :count => 1 do
+ assert_select "input#diary_entry_title[name='diary_entry[title]'][value='#{entry.title}']", :count => 1
+ assert_select "textarea#diary_entry_body[name='diary_entry[body]']", :text => entry.body, :count => 1
+ assert_select "select#diary_entry_language_code", :count => 1
+ assert_select "input#latitude[name='diary_entry[latitude]']", :count => 1
+ assert_select "input#longitude[name='diary_entry[longitude]']", :count => 1
+ assert_select "input[name=commit][type=submit][value=Save]", :count => 1
+ assert_select "input[name=commit][type=submit][value=Edit]", :count => 1
+ assert_select "input[name=commit][type=submit][value=Preview]", :count => 1
+ assert_select "input", :count => 7
+ end