spec/jason_object_spec.rb in medea-0.6.9 vs spec/jason_object_spec.rb in medea-0.7.0
- old
+ new
@@ -119,22 +119,22 @@
@user.to_public_url.should eq(@user.to_url :public)
end
it "should post security information properly" do
@user.add_public :GET, :POST
- RestClient.should_receive(:post).with(anything(), anything(), hash_including("X-PUBLIC" => "GET,POST")).and_return(DummyResponse.new)
+ RestClient.should_receive(:post).with(anything(), anything(), hash_including("X-PERMISSIONS" => "{PUBLIC:[GET,POST]}")).and_return(DummyResponse.new)
@user.save!
end
it "should only post valid verbs" do
@user.add_public :GET, :FAKEVERB
- RestClient.should_receive(:post).with(anything(), anything(), hash_including("X-PUBLIC" => "GET")).and_return(DummyResponse.new)
+ RestClient.should_receive(:post).with(anything(), anything(), hash_including("X-PERMISSIONS" => "{PUBLIC:[GET]}")).and_return(DummyResponse.new)
@user.save!
end
it "should load security information properly" do
@user.set_public :GET, :POST
@user.save!
retrieved_user = User.get_by_key @user.jason_key
- (retrieved_user.send(:instance_variable_get, :@public)).should eq(["GET", "POST"])
+ retrieved_user.get_public.should eq(["GET", "POST"])
end
end
\ No newline at end of file