lib/greygoo/testagent.rb
# Register a user, save their id and draw their sword
Register a user, save their id and draw their sword
Register a user save their id and draw their sword
def register_user
			res = json_get("/enter?name=#{name}")
			@browser.header('X-Authentication', res['session_key'])
			res = json_get('/self')
			@user_id = res['id']
			weapon_id = res['objects'][0]['id']
			res = json_get("/object/#{weapon_id}/wield")
		end
def register_user res = json_get ( "/enter?name=#{name}" ) @browser . header ( 'X-Authentication' , res [ 'session_key' ] ) res = json_get ( '/self' ) @user_id = res [ 'id' ] weapon_id = res [ 'objects' ] [ 0 ] [ 'id' ] res = json_get ( "/object/#{weapon_id}/wield" ) end
Register a user, save their id and draw their sword
Register a user save their id and draw their sword