test/components/forms/submit_test.rb in express_templates-0.5.0 vs test/components/forms/submit_test.rb in express_templates-0.7.0
- old
+ new
@@ -1,12 +1,17 @@
require 'test_helper'
+class Stuff
+ def self.columns
+ []
+ end
+end
+
class SubmitTest < ActiveSupport::TestCase
test "submit takes string param for value" do
- fragment = -> {
- express_form(:stuff) {
- submit "Save it!"
- }
+ fragment = -> (ctx) {
+ submit "Save it!"
}
- assert_match '#{submit_tag("Save it!", {})}', ExpressTemplates.compile(&fragment)
+ assert_match '<div class="field-wrapper"><input type="submit" name="commit" value="Save it!" /></div>',
+ arbre(&fragment)
end
end