Sha256: d7b1bcba0206c67ab0b158978042d7417227ee73b24334d56b5c036cca2f2633

Contents?: true

Size: 943 Bytes

Versions: 5

Compression:

Stored size: 943 Bytes

Contents

require 'spec_helper'

describe 'Capybara drivers', type: :feature, js: true do
  it 'allows HTTPS calls' do
    proxy.stub('https://blog.howmanyleft.co.uk:443/api/read/json').and_return(
      jsonp: {
        posts: [
          {
            'regular-title' => 'News Item 1',
            'url-with-slug' => 'http://example.com/news/1',
            'regular-body' => 'News item 1 content here'
          },
          {
            'regular-title' => 'News Item 2',
            'url-with-slug' => 'http://example.com/news/2',
            'regular-body' => 'News item 2 content here'
          }
        ]
      })

    visit '/tumblr_api_https.html'

    expect(page).to have_link('News Item 1', href: 'http://example.com/news/1')
    expect(page).to have_content('News item 1 content here')
    expect(page).to have_link('News Item 2', href: 'http://example.com/news/2')
    expect(page).to have_content('News item 2 content here')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
puffing-billy-3.0.0 spec/lib/billy/browsers/capybara_spec.rb
puffing-billy-2.4.1 spec/lib/billy/browsers/capybara_spec.rb
puffing-billy-2.4.0 spec/lib/billy/browsers/capybara_spec.rb
puffing-billy-2.3.1 spec/lib/billy/browsers/capybara_spec.rb
puffing-billy-2.3.0 spec/lib/billy/browsers/capybara_spec.rb