Sha256: 30045d0947fd0c197a62d053fef32b423215daace617ca8a4b36d8ad8a699a84
Contents?: true
Size: 926 Bytes
Versions: 9
Compression:
Stored size: 926 Bytes
Contents
require 'test_helper' class Stuff def self.columns [] end end class SubmitTest < ActiveSupport::TestCase test "submit takes string param for value" do fragment = -> (ctx) { submit value: "Save it!" } assert_match '<div class="field-wrapper"><input type="submit" name="commit" value="Save it!" /></div>', arbre(&fragment) end test "submit accepts a class option" do fragment = -> (ctx) { submit class: 'button' } assert_match '<div class="field-wrapper"><input type="submit" name="commit" value="Save" class="button" /></div>', arbre(&fragment) end test "submit accepts a value and class option" do fragment = -> (ctx) { submit value: 'XYZ', class: 'button' } assert_match '<div class="field-wrapper"><input type="submit" name="commit" value="XYZ" class="button" /></div>', arbre(&fragment) end end
Version data entries
9 entries across 9 versions & 2 rubygems