Sha256: ae62a6435a86a50da2f69b43878f22a0be9f6c2343998b651f3e754c3f4560bd

Contents?: true

Size: 495 Bytes

Versions: 9

Compression:

Stored size: 495 Bytes

Contents

require "helper"

describe 'Requests' do
  context 'w/ trailing slash' do
    it 'sets X-Wiselinks header field correctly' do
      get('trailing-slash/', {}, {"X-Wiselinks" => 'template'})
      response.headers['X-Wiselinks-Url'].should =~ /trailing-slash\z/
    end
  end

  context 'w/out slash' do
    it 'sets X-Wiselinks header field correctly' do
      get('no-slash', {}, {"X-Wiselinks" => 'template'})
      response.headers['X-Wiselinks-Url'].last.should_not == '/'
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
wiselinks-artirix-1.3.0 spec/requests/trailing_slash_spec.rb
wiselinks-1.2.1 spec/requests/trailing_slash_spec.rb
wiselinks-1.2.0 spec/requests/trailing_slash_spec.rb
wiselinks-1.1.4 spec/requests/trailing_slash_spec.rb
wiselinks-1.1.2 spec/requests/trailing_slash_spec.rb
wiselinks-1.1.1 spec/requests/trailing_slash_spec.rb
wiselinks-1.1.0 spec/requests/trailing_slash_spec.rb
wiselinks-1.0.0 spec/requests/trailing_slash_spec.rb
wiselinks-0.7.3 spec/requests/trailing_slash_spec.rb