Sha256: 4e06c9d5a73b6c987e9526de74b791a9c0a1fb3b145773d37522199508dea42c

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

require 'test_helper'

class NavigationTest < ActionDispatch::IntegrationTest
  test '/channel.html should have the proper content' do
    get '/channel.html'
    assert_equal "<script src='//connect.facebook.net/en_US/all.js'></script>", body
  end

  test '/channel.html should show proper locale' do
    FacebookJs.locale = 'zh_CN'
    get '/channel.html'
    assert_equal "<script src='//connect.facebook.net/zh_CN/all.js'></script>", body
  end

  test '/channel.html should have the proper headers' do
    get '/channel.html'
    assert_equal "public", headers[:"Pragma"]
    assert_equal "max-age=31536000", headers[:"Cache-Control"]
    assert_equal "public", headers[:"Pragma"]
    assert headers[:"Expires"]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
facebook_js-0.0.3 test/integration/navigation_test.rb
facebook_js-0.0.2 test/integration/navigation_test.rb
facebook_js-0.0.1 test/integration/navigation_test.rb