Skip to content

Instantly share code, notes, and snippets.

Created March 21, 2013 11:20
Show Gist options
  • Save anonymous/5212317 to your computer and use it in GitHub Desktop.
Save anonymous/5212317 to your computer and use it in GitHub Desktop.
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