Sha256: c9dea290be54052738ae2ddaaee5c8b5e3e54863d9f94cd067d3a0e124c451ef
Contents?: true
Size: 1.23 KB
Versions: 21
Compression:
Stored size: 1.23 KB
Contents
require File.join(File.dirname(__FILE__), '/../../test_helper') class Cms::ApplicationHelperTest < ActionView::TestCase def test_url_with_mode [ [["http://localhost:3000", "edit"], "?mode=edit"], [["http://localhost:3000/", "edit"], "/?mode=edit"], [["http://localhost:3000/foo", "edit"], "/foo?mode=edit"], [["http://localhost:3000/foo?bar=1", "edit"], "/foo?bar=1&mode=edit"], [["http://localhost:3000/foo?mode=view", "edit"], "/foo?mode=edit"], [["http://localhost:3000/foo?bar=1&mode=view", "edit"], "/foo?bar=1&mode=edit"], [["http://localhost:3000/foo?other_mode=1&mode=view", "edit"], "/foo?other_mode=1&mode=edit"], [["/foo?other_mode=1&mode=view", "edit"], "/foo?other_mode=1&mode=edit"] ].each do |args, expected| assert_equal expected, url_with_mode(*args) end end def test_determine_order assert_equal "foo", determine_order("foo desc", "foo desc") assert_equal "foo", determine_order("foo desc", "foo") assert_equal "foo desc", determine_order("foo", "foo desc") assert_equal "foo desc", determine_order("foo", "foo") assert_equal "bar desc", determine_order("foo", "bar desc") assert_equal "bar", determine_order("foo", "bar") end end
Version data entries
21 entries across 21 versions & 8 rubygems