Don't write any opslog when count and size didn't change (same file)

This commit is contained in:
Garret Alfert
2013-11-19 19:35:04 +01:00
parent 2f95aab874
commit 17068f33df
2 changed files with 20 additions and 1 deletions

View File

@@ -398,6 +398,22 @@ describe "App with Riak backend" do
log_entry.indexes["user_id_bin"].must_include "jimmy"
end
context "overwriting existing file with same file" do
before do
header "Content-Type", "image/jpeg; charset=binary"
filename = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures", "rockrule.jpeg")
@image = File.open(filename, "r").read
put "/jimmy/documents/jaypeg", @image
end
it "doesn't log the operation" do
objects = []
opslog_bucket.keys.each { |k| objects << opslog_bucket.get(k) rescue nil }
objects.size.must_equal 1
end
end
context "overwriting existing file with different file" do
before do
header "Content-Type", "image/jpeg; charset=binary"