mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Changed the observe field node into a div with display:none
This commit is contained in:
committed by
Stefan Penner
parent
fab8b25c15
commit
88e793e5e7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user