oodler 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -16,6 +16,10 @@ module Oodler
16
16
  elements
17
17
  end
18
18
 
19
+
20
+
21
+
22
+
19
23
 
20
24
 
21
25
  end
@@ -145,9 +145,7 @@ class ClientTest < Test::Unit::TestCase
145
145
  stub_get("/api/v2/listings?attributes=job_title_software_engineer&region=usa&key=key&category=job", "refinement.xml")
146
146
  p = @oodler.usa_job_search(:attributes => "job_title_software_engineer")
147
147
  p.refinements.values.should_not be_empty
148
- p.refinements.values[0].name.should == "Job Title"
149
-
150
-
148
+ p.refinements.values[0].name.should == "Job Title"
151
149
  end
152
150
 
153
151
 
@@ -16,6 +16,18 @@ class MyTest < Test::Unit::TestCase
16
16
 
17
17
  object.values.should_not be_empty
18
18
 
19
+ end
20
+
21
+ should "parse the contained refinements xml correctly" do
22
+ object = Oodler::OodleResponse.from_xml(fixture_file("refinement.xml"))
23
+ object.refinements.values.should_not be_empty
24
+ object.refinements.values.select{|item| item.name == "Job Title"}.should_not be_empty
25
+ object.refinements.values.select{|item| item.name == "Job Title"}.first.values.should_not be_empty
26
+ object.refinements.values.select{|item| item.name == "Job Title"}.first.values.first.name.should == "Manager"
27
+ object.refinements.values.select{|item| item.name == "Job Title"}.first.values.first.id.should == "job_title_manager"
28
+ object.refinements.values.select{|item| item.name == "Job Title"}.first.values.collect {|refinement| [refinement.name, refinement.id]}.should == [["Manager", "job_title_manager"], ["Tax Manager", "job_title_tax_manager"], ["Consultant", "job_title_consultant"], ["Analyst", "job_title_analyst"], ["Systems Specialist", "job_title_systems_specialist"], ["Senior Level Deepwater", "job_title_senior_level_deepwater"], ["Senior", "job_title_senior"], ["Representative", "job_title_representative"], ["Program Coordinator", "job_title_program_coordinator"], ["Procurement Process Leader", "job_title_procurement_process_leader"], ["Operations Process Leader", "job_title_operations_process_leader"], ["Operations", "job_title_operations"], ["Are You Looking for a Gas", "job_title_are_you_looking_for_a_gas"], ["Make - Per Hour Making", "job_title_make_per_hour_making"], ["Looking for an Oil Industry", "job_title_looking_for_an_oil_industry"], ["Looking for an Energy", "job_title_looking_for_an_energy"], ["Looking for a Solar Industry", "job_title_looking_for_a_solar_industry"], ["Looking for a Power Industry", "job_title_looking_for_a_power_industry"], ["Looking for a Green Energy", "job_title_looking_for_a_green_energy"], ["Looking for a Gas Industry", "job_title_looking_for_a_gas_industry"], ["Global Sap Procurement Process", "job_title_global_sap_procurement_process"], ["General Manager", "job_title_general_manager"], ["Fluids Specialist", "job_title_fluids_specialist"], ["Environmental Specialist", "job_title_environmental_specialist"], ["Engineer", "job_title_engineer"]]
29
+
30
+
19
31
  end
20
32
  end
21
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oodler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Hagedorn