Explicitly load directory object again in spec

This commit is contained in:
galfert 2012-10-02 16:50:22 +02:00
parent abdf6f08e0
commit 4e88cd480c

View File

@ -178,10 +178,10 @@ describe "Directories" do
context "existing directory object" do context "existing directory object" do
before do before do
@directory = directory_bucket.new("jimmy:tasks/home") directory = directory_bucket.new("jimmy:tasks/home")
@directory.content_type = "text/plain" directory.content_type = "text/plain"
@directory.data = 2.seconds.ago.to_i.to_s directory.data = 2.seconds.ago.to_i.to_s
@directory.store directory.store
end end
it "updates the timestamp of the directory" do it "updates the timestamp of the directory" do
@ -189,10 +189,10 @@ describe "Directories" do
last_response.status.must_equal 200 last_response.status.must_equal 200
@directory.reload
object = data_bucket.get("jimmy:tasks/home:trash") object = data_bucket.get("jimmy:tasks/home:trash")
directory = directory_bucket.get("jimmy:tasks/home")
@directory.data.to_i.must_equal object.last_modified.to_i directory.data.to_i.must_equal object.last_modified.to_i
end end
end end
end end