Sha256: e5d540d63b1770db8ee366e9d7313d6ac1b2ef294fde90b873e10d7c7a701a56

Contents?: true

Size: 751 Bytes

Versions: 31

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

describe 'http endpoints', type: :feature, sauce: true do
  it 'should show the page' do
    visit '/simple_http'
    expect(page).to have_content('this is just some text')
  end

  it 'should have access to the store' do
    store._simple_http_tests << { name: 'hello' }
    visit '/simple_http/store'
    expect(page).to have_content('You had me at hello')
  end

  it 'should upload and store a file' do
    file = 'tmp/uploaded_file'
    FileUtils.rm(file) if File.exist?(file)
    visit '/upload'
    attach_file('file', __FILE__)
    find('#submit_file_upload').click
    expect(page).to have_content('successfully uploaded')
    expect(File.exist?(file)).to be(true)
    FileUtils.rm(file) if File.exist?(file)
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
volt-0.9.6 spec/integration/http_endpoints_spec.rb
volt-0.9.6.pre3 spec/integration/http_endpoints_spec.rb
volt-0.9.6.pre2 spec/integration/http_endpoints_spec.rb
volt-0.9.6.pre1 spec/integration/http_endpoints_spec.rb
volt-0.9.5 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre12 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre11 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre9 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre8 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre7 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre6 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre5 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre4 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre3 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre2 spec/integration/http_endpoints_spec.rb
volt-0.9.5.pre1 spec/integration/http_endpoints_spec.rb
volt-0.9.4 spec/integration/http_endpoints_spec.rb
volt-0.9.4.pre5 spec/integration/http_endpoints_spec.rb
volt-0.9.4.pre3 spec/integration/http_endpoints_spec.rb
volt-0.9.4.pre2 spec/integration/http_endpoints_spec.rb