Sha256: 99fed15308f1ccaaaab8d2967fa2c81cee068e5ed46fbf1dd5762018d3ab9d47

Contents?: true

Size: 677 Bytes

Versions: 14

Compression:

Stored size: 677 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Type::Cardtype do
  describe "add_button view" do
    it "creates link with correct path" do
      add_link = render_content "{{Basic|add_button}}"
      assert_view_select add_link, 'a[href="/new/Basic"]', "Add Basic"
    end
    it "handles title argument" do
      add_link = render_content "{{Basic|add_button;title: custom link text}}"
      assert_view_select add_link, 'a[href="/new/Basic"]', "custom link text"
    end
    it "handles params" do
      add_link = render_content "{{Basic|add_button;params:_project=_self}}"
      assert_view_select add_link, 'a[href="/new/Basic?_project=Tempo+Rary+2"]'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
card-1.91 mod/standard/spec/set/type/cardtype_spec.rb
card-1.21.0 mod/standard/spec/set/type/cardtype_spec.rb
card-1.20.4 mod/standard/spec/set/type/cardtype_spec.rb
card-1.20.3 mod/standard/spec/set/type/cardtype_spec.rb
card-1.20.2 mod/standard/spec/set/type/cardtype_spec.rb
card-1.20.1 mod/standard/spec/set/type/cardtype_spec.rb
card-1.20.0 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.6 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.5 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.4 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.3 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.2 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.1 mod/standard/spec/set/type/cardtype_spec.rb
card-1.19.0 mod/standard/spec/set/type/cardtype_spec.rb