JQuery in, Prototype/Scriptaculous out (#11445).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-07-22 13:29:26 +00:00
parent 387836f8aa
commit 6a2ca5e034
122 changed files with 1431 additions and 10962 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ class MyControllerTest < ActionController::TestCase
end
def test_order_blocks
xhr :post, :order_blocks, :group => 'left', 'list-left' => ['documents', 'calendar', 'latestnews']
xhr :post, :order_blocks, :group => 'left', 'blocks' => ['documents', 'calendar', 'latestnews']
assert_response :success
assert_equal ['documents', 'calendar', 'latestnews'], User.find(2).pref[:my_page_layout]['left']
end
+1 -1
View File
@@ -41,7 +41,7 @@ class VersionsControllerTest < ActionController::TestCase
# Completed version doesn't appear
assert !assigns(:versions).include?(Version.find(1))
# Context menu on issues
assert_select "script", :text => Regexp.new(Regexp.escape("new ContextMenu('/issues/context_menu')"))
assert_select "script", :text => Regexp.new(Regexp.escape("contextMenuInit('/issues/context_menu')"))
# Links to versions anchors
assert_tag 'a', :attributes => {:href => '#2.0'},
:ancestor => {:tag => 'div', :attributes => {:id => 'sidebar'}}
+2 -2
View File
@@ -37,7 +37,7 @@ class WatchersControllerTest < ActionController::TestCase
assert_difference('Watcher.count') do
xhr :post, :watch, :object_type => 'issue', :object_id => '1'
assert_response :success
assert @response.body.include?('$$(".issue-1-watcher")')
assert_include '$(".issue-1-watcher")', response.body
end
assert Issue.find(1).watched_by?(User.find(3))
end
@@ -72,7 +72,7 @@ class WatchersControllerTest < ActionController::TestCase
assert_difference('Watcher.count', -1) do
xhr :post, :unwatch, :object_type => 'issue', :object_id => '2'
assert_response :success
assert @response.body.include?('$$(".issue-2-watcher")')
assert_include '$(".issue-2-watcher")', response.body
end
assert !Issue.find(1).watched_by?(User.find(3))
end
+2 -2
View File
@@ -77,7 +77,7 @@ class WelcomeControllerTest < ActionController::TestCase
get :index
assert_tag 'script',
:attributes => {:type => "text/javascript"},
:content => %r{new WarnLeavingUnsaved}
:content => %r{warnLeavingUnsaved}
end
def test_warn_on_leaving_unsaved_turn_off
@@ -89,7 +89,7 @@ class WelcomeControllerTest < ActionController::TestCase
get :index
assert_no_tag 'script',
:attributes => {:type => "text/javascript"},
:content => %r{new WarnLeavingUnsaved}
:content => %r{warnLeavingUnsaved}
end
def test_call_hook_mixed_in