diff options
author | Bob Remeika <bob.remeika@gmail.com> | 2009-09-23 15:06:56 -0700 |
---|---|---|
committer | Stefan Penner <stefan.penner@gmail.com> | 2010-01-27 12:44:30 -0600 |
commit | d383f057c0821faf1d1d472b471628b37cf8d67c (patch) | |
tree | 6481f562dd5d03ff52d6bec2e0695eac832a3c34 /actionpack/test | |
parent | 25c5ddd021333f47d9728d6e2a31927d1224a869 (diff) | |
download | rails-d383f057c0821faf1d1d472b471628b37cf8d67c.tar.gz rails-d383f057c0821faf1d1d472b471628b37cf8d67c.tar.bz2 rails-d383f057c0821faf1d1d472b471628b37cf8d67c.zip |
Changed the observe field node into a div with display:none
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/javascript/ajax_test.rb | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/actionpack/test/javascript/ajax_test.rb b/actionpack/test/javascript/ajax_test.rb index 6539583398..e46e346d79 100644 --- a/actionpack/test/javascript/ajax_test.rb +++ b/actionpack/test/javascript/ajax_test.rb @@ -123,22 +123,26 @@ class ObserveFieldTest < AjaxTestCase test "basic" do assert_html field, - %w(data-observe="true") - end - - test "with a :frequency option" do - assert_html field(:frequency => 5.minutes), - %w(data-observe="true" data-frequency="300") + %w(div style="display:none" data-observe="true" data-observe-field="title") end test "using a url string" do assert_html field(:url => "/some/other/url"), - %w(data-observe="true" data-url="/some/other/url") + %w(data-url="/some/other/url") end test "using a url hash" do assert_html field(:url => {:controller => :blog, :action => :update}), - %w(data-observe="true" data-url="/url/hash") + %w(data-url="/url/hash") + end + + test "with a :frequency option" do + assert_html field(:frequency => 5.minutes), + %w(data-frequency="300") + end + + test "with a :frequency option of 0" do + assert_no_match /data-frequency/, field(:frequency => 0) end # def test_observe_field |