Sha256: 0c85d0df9c4a48f2b4074cc1c2b2abc229f38301b370ae349ea9b2af8ceb0c6a

Contents?: true

Size: 962 Bytes

Versions: 7

Compression:

Stored size: 962 Bytes

Contents

require 'spec_helper'

describe 'curation_concerns/base/_social_media.html.erb', type: :view do
  let(:url) { 'http://example.com/' }
  let(:title) { 'Example' }
  let(:page) do
    render partial: 'curation_concerns/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

7 entries across 7 versions & 1 rubygems

Version Path
sufia-7.4.1 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.4.0 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.3.1 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.3.0 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.3.0.rc3 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.3.0.rc2 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb
sufia-7.3.0.rc1 spec/views/curation_concerns/base/_social_media.html.erb_spec.rb