Sha256: 5b576ce480ff8dedddbfb4e3b0f2ace677980bd56ced1bb4fa3ac2f993c0e37f

Contents?: true

Size: 938 Bytes

Versions: 10

Compression:

Stored size: 938 Bytes

Contents

require 'spec_helper'

describe 'hyrax/base/_social_media.html.erb', type: :view do
  let(:url) { 'http://example.com/' }
  let(:title) { 'Example' }
  let(:page) do
    render partial: 'hyrax/base/social_media', locals: { share_url: url, page_title: title }
    Capybara::Node::Simple.new(rendered)
  end

  it 'renders various social media share links' do
    expect(page).to have_selector '.resp-sharing-button__link'
    expect(page).to have_link '', href: 'https://facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2F'
    expect(page).to have_link '', href: 'https://twitter.com/intent/tweet/?text=Example&url=http%3A%2F%2Fexample.com%2F'
    expect(page).to have_link '', href: 'https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2F'
    expect(page).to have_link '', href: 'https://www.tumblr.com/widgets/share/tool?canonicalUrl=http%3A%2F%2Fexample.com%2F&posttype=link&shareSource=tumblr_share_button'
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.1.0 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.5 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.4 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.3 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.2 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.1 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.0.rc2 spec/views/hyrax/base/_social_media.html.erb_spec.rb
hyrax-1.0.0.rc1 spec/views/hyrax/base/_social_media.html.erb_spec.rb
test_hyrax-0.0.1.alpha spec/views/hyrax/base/_social_media.html.erb_spec.rb