Sha256: 9f8a60fb78ad45d32eb6b2baf6c569c131259c3f5d5f7afe4803d85434ac6fbe

Contents?: true

Size: 672 Bytes

Versions: 7

Compression:

Stored size: 672 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

7 entries across 7 versions & 1 rubygems

Version Path
card-1.16.1 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.16.0 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.15.7 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.15.6 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.15.5 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.15.4 mod/05_standard/spec/set/type/cardtype_spec.rb
card-1.15.3 mod/05_standard/spec/set/type/cardtype_spec.rb