summaryrefslogtreecommitdiff
path: root/chef/spec/unit/webui_user_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef/spec/unit/webui_user_spec.rb')
-rw-r--r--chef/spec/unit/webui_user_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/chef/spec/unit/webui_user_spec.rb b/chef/spec/unit/webui_user_spec.rb
index 0e1c053013..4db9294b4e 100644
--- a/chef/spec/unit/webui_user_spec.rb
+++ b/chef/spec/unit/webui_user_spec.rb
@@ -217,8 +217,8 @@ describe Chef::WebUIUser do
end
it "sets its couchdb id when loading from the database" do
- # reqs via REST eventually get to JSON.parse
- webui_user = JSON.parse('{"salt":null,"name":"test_user","json_class":"Chef::WebUIUser","admin":false,"openid":null,"password":null,"chef_type":"webui_user","_id":"IdontNeedNoID"}')
+ # reqs via REST eventually get to Chef::JSON.from_json
+ webui_user = Chef::JSON.from_json('{"salt":null,"name":"test_user","json_class":"Chef::WebUIUser","admin":false,"openid":null,"password":null,"chef_type":"webui_user","_id":"IdontNeedNoID"}')
webui_user.couchdb_id.should == "IdontNeedNoID"
end
@@ -230,9 +230,9 @@ describe Chef::WebUIUser do
end
it "sets the couchdb_rev when loading from the database" do
- webui_user = JSON.parse('{"salt":null,"name":"test_user","json_class":"Chef::WebUIUser","admin":false,"openid":null,"password":null,"chef_type":"webui_user","_id":"IdontNeedNoID","_rev":"moto"}')
+ webui_user = Chef::JSON.from_json('{"salt":null,"name":"test_user","json_class":"Chef::WebUIUser","admin":false,"openid":null,"password":null,"chef_type":"webui_user","_id":"IdontNeedNoID","_rev":"moto"}')
webui_user.couchdb_rev.should == "moto"
end
end
-end \ No newline at end of file
+end