Sha256: 06758ee8a5bb1001d906fc480a0e2d15afd426c5c126c2e169890be03fde3d9a

Contents?: true

Size: 644 Bytes

Versions: 47

Compression:

Stored size: 644 Bytes

Contents

(function() {

module('csrf-refresh', {})

asyncTest('refresh all csrf tokens', 1, function() {
  var correctToken = 'cf50faa3fe97702ca1ae'

  var form = $('<form />')
  var input = $('<input>').attr({ type: 'hidden', name: 'authenticity_token', id: 'authenticity_token', value: 'foo' })
  input.appendTo(form)

  $('#qunit-fixture')
    .append('<meta name="csrf-param" content="authenticity_token"/>')
    .append('<meta name="csrf-token" content="' + correctToken + '"/>')
    .append(form)

  $.rails.refreshCSRFTokens()
  currentToken = $('#qunit-fixture #authenticity_token').val()

  start()
  equal(currentToken, correctToken)
})

})()

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
jets-1.9.7 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.6 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.5 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.4 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.3 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.2 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.1 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.9.0 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.14 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.13 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.12 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.11 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.10 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.9 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.8 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.7 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.6 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.5 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.4 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js
jets-1.8.3 vendor/rails/actionview/test/ujs/public/test/csrf-refresh.js