Sha256: e60c90d33775452dc838353ea81313f3f5e81a7ac36db245bccfbcfb82689fef

Contents?: true

Size: 493 Bytes

Versions: 16

Compression:

Stored size: 493 Bytes

Contents

# -*- encoding : utf-8 -*-
describe Card::Set::All::Links do
  require 'card'
  describe '#web_link' do
    it 'opens external link in new tab' do
      link = Card['Home'].format.web_link("http://example.com")
      assert_view_select link, 'a[class="external-link"][target="_blank"][href="http://example.com"]'
    end

    it 'opens interal link in same tab' do
      link = Card['Home'].format.web_link("/Home")
      assert_view_select link, 'a[target="_blank"]', false
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
card-1.17.4 mod/05_standard/spec/set/all/links_spec.rb
card-1.17.3 mod/05_standard/spec/set/all/links_spec.rb
card-1.17.2 mod/05_standard/spec/set/all/links_spec.rb
card-1.17.1 mod/05_standard/spec/set/all/links_spec.rb
card-1.17.0 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.15 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.14 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.13 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.12 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.11 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.10 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.9 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.8 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.7 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.6 mod/05_standard/spec/set/all/links_spec.rb
card-1.16.5 mod/05_standard/spec/set/all/links_spec.rb