Created
March 21, 2013 11:20
-
-
Save anonymous/5212317 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
require 'open-uri' | |
it 'sends get request to web.memc to invoke the php script create_user_with_hashed_password - then validates the password in rails' do | |
password = 'testphp' | |
user_count = User.find(:all).count | |
open_uri_result = '' | |
open("http://web.memc/create_user_with_hashed_password.php?password=#{password}").each do |f| | |
open_uri_result << f | |
end | |
open_uri_result.should eql('okay') | |
user_count_again = User.find(:all).count | |
user_count_again.should eql(user_count + 1) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment