Add preview functionality to rich text controls
This commit is contained in:
parent
b6163f0fc2
commit
561f2f694a
15 changed files with 191 additions and 8 deletions
|
@ -159,7 +159,9 @@ class DiaryEntryControllerTest < ActionController::TestCase
|
|||
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 "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
|
||||
end
|
||||
end
|
||||
|
|
|
@ -54,6 +54,10 @@ class SiteControllerTest < ActionController::TestCase
|
|||
{ :path => "/go/shortcode", :method => :get },
|
||||
{ :controller => "site", :action => "permalink", :code => "shortcode" }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/preview/formatname", :method => :get },
|
||||
{ :controller => "site", :action => "preview", :format => "formatname" }
|
||||
)
|
||||
end
|
||||
|
||||
## Lets check that we can get all the pages without any errors
|
||||
|
|
|
@ -367,7 +367,7 @@ class UserControllerTest < ActionController::TestCase
|
|||
assert_template :account
|
||||
assert_select "div#errorExplanation", false
|
||||
assert_select "div#notice", /^User information updated successfully/
|
||||
assert_select "table#accountForm > tr > td > textarea#user_description", user.description
|
||||
assert_select "table#accountForm > tr > td > div#user_description_container > div#user_description_content > textarea#user_description", user.description
|
||||
|
||||
# Changing name to one that exists should fail
|
||||
user.display_name = users(:public_user).display_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue