Cuke step for basic auth

Tagged with Rails cucumber webrat

Language: Apache

View as text

When /^I post to "([^\"]*)" as "(.*)\/(.*)" with the following params:$/ do |path, username, password, table|
  basic_auth(username, password)
  post_params = table.hashes.first
  visit path, :post, post_params
Original snippet written by Thoughtbot
Last updated at 10:17 AM on Apr 04, 2010 by Brian Hogan

SnippetStash costs money to host and develop. The service is free for everyone to use
but if you found it useful please consider making a small donation.