-
Notifications
You must be signed in to change notification settings - Fork 0
add delete #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add delete #84
Conversation
@@ -44,6 +44,12 @@ def perform_delete(parameters={}) | |||
process(parameters) | |||
end | |||
|
|||
def set_authenticity_token |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ... don't really know how to test this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does something like this look good?
it "can set authenticity token for the request" do
test_request = nil
Module.new do
extend RailsEdgeTest::Dsl
controller MyController do
action :simple do
edge "set the authenticity token" do
test_request = request
set_authenticity_token
end
end
end
end
allow_any_instance_of(MyController).to receive(:form_authenticity_token).and_return('a_test_token')
RailsEdgeTest::Dsl.execute!
expect(test_request.headers['X-CSRF-Token']).to eq 'a_test_token'
end
Co-authored-by: Mfon Eti-mfon <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
migrates these helpers out of our rails monolith