Note that there are some explanatory texts on larger screens.

plurals
  1. PO[HTTP]how to change "www.example.com" to "localhost:3000"
    primarykey
    data
    text
    <p>hi I'm create test use cucumber in my rails apps. in my step scenario I used http basic authenticate, so far it pass the basic authenticate, but when I wanna to call method on controller and post some params, I had problem :</p> <p>first I use this code in step but failed not cross to method on controller : </p> <pre><code>post some_admin_url, @params </code></pre> <p>second I used this code, and failed also, the error is when running the URI.parse redirect to "www.example.com" I want to go "localhost:3000/admin", so I can match the data :</p> <pre><code>Net::HTTP.post_form(URI.parse(some_admin_url), {'from' =&gt; '2005-01-01','to' =&gt; '2005-03-31'}) { |i| } </code></pre> <p>FUTURE :</p> <p>@selenium<br/> Scenario: Admin want to activate user<br/> Given one user logged in as admin<br/> And admin page<br/></p> <p>STEPS :</p> <p>Given /^one user logged in as admin$/ do<br/> create_user_admin<br/> visit '/user_sessions/new'<br/> fill_in 'user_session[login]', :with=>'siadmin'<br/> fill_in 'user_session[password]', :with=>'12345'<br/> click_button 'Anmelden'<br/> end<br/><br/></p> <p>Given /^admin page$/ do<br/> require "net/http"<br/> require "uri"<br/><br/></p> <pre><code>uri = URI.parse(user_action_admin_users_url)&lt;br/&gt; http = Net::HTTP.new(uri.host, uri.port)&lt;br/&gt; request = Net::HTTP::Get.new(uri.request_uri)&lt;br/&gt; request.basic_auth("username", "password")&lt;br/&gt; response = http.request(request)&lt;br/&gt; </code></pre> <p>end<br/></p> <pre><code>enter code here </code></pre> <p>HELP !!!</p> <p>THANKS</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload