Sha256: 4da3f0fdc94835444292d45090a2dfdc4f81123ad05017b380176c69e8571d22

Contents?: true

Size: 761 Bytes

Versions: 6

Compression:

Stored size: 761 Bytes

Contents

require 'test_helper'
class LinkTest < ActionView::TestCase
  include UiBibz::Helpers::Ui::CoreHelper

  test 'Link' do
    actual = ui_link 'My link', url: "#link"
    expected = "<a href=\"#link\">My link</a>"

    assert_equal expected, actual
  end

  test 'Link without text' do
    actual = ui_link 'My link', glyph: "gem", text: false, url: "#link"
    expected = "<a href=\"#link\"><i title=\"My link\" class=\"glyph fas fa-gem\"></i></a>"

    assert_equal expected, actual
  end

  test "Link with collapse option" do
    actual = ui_link 'My link', url: "#link", collapse: 'collapse-id'
    expected = "<a role=\"button\" data-toggle=\"collapse\" data-target=\"#collapse-id\" href=\"#link\">My link</a>"

    assert_equal expected, actual
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ui_bibz-2.3.5 test/ui/core/navigations/link_test.rb
ui_bibz-2.3.4 test/ui/core/navigations/link_test.rb
ui_bibz-2.3.3 test/ui/core/navigations/link_test.rb
ui_bibz-2.3.2 test/ui/core/navigations/link_test.rb
ui_bibz-2.3.1 test/ui/core/navigations/link_test.rb
ui_bibz-2.3.0 test/ui/core/navigations/link_test.rb