2011-05-23 17:36:16 +02:00
|
|
|
require File.expand_path('../spec_helper.rb', __FILE__)
|
|
|
|
|
|
|
|
describe Rack::Protection::AuthenticityToken do
|
|
|
|
it_behaves_like "any rack application"
|
2011-06-19 15:35:58 +02:00
|
|
|
it "denies post requests without any token"
|
|
|
|
it "accepts post requests with correct X-CSRF-Token header"
|
|
|
|
it "denies post requests with wrong X-CSRF-Token header"
|
|
|
|
it "accepts post form requests with correct authenticity_token field"
|
|
|
|
it "denies post form requests with wrong authenticity_token field"
|
|
|
|
it "prevents ajax requests without a valid token"
|
2011-05-23 17:36:16 +02:00
|
|
|
end
|