spec/lib/authorities_mesh_spec.rb in qa-0.0.1 vs spec/lib/authorities_mesh_spec.rb in qa-0.0.2

- old
+ new

@@ -26,13 +26,19 @@ after(:all) do Qa::SubjectMeshTerm.delete_all end it "handles queries" do - pending "Re-enable this test once Mesh#results is changed to return a hash of results instead of a single json string" - m = Authorities::Mesh.new('mr') + m = Qa::Authorities::Mesh.new + m.search('mr') results = m.results results.should include( {id: '1', label: 'Mr Plow'} ) results.length.should == 3 + end + + it "gets full records" do + m = Qa::Authorities::Mesh.new + result = m.get_full_record('2') + result.should == {id: '2', label: 'Mr Snow', synonyms: []} end end end