Created
June 20, 2012 13:47
-
-
Save peterhellberg/2959966 to your computer and use it in GitHub Desktop.
save_current_checksums
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "save_current_checksums" do | |
it "saves the current checksums to redis" do | |
checksums = { foo: 'bar', baz: 'qux'} | |
REDIS.keys.must_be_empty | |
fingerprint.stub(:field_checksums, checksums) do | |
fingerprint.save_current_checksums | |
REDIS.get('vision:episode:123456:checksum'). | |
must_equal 'cde20e675ab76c3e183e6ef11c2e2500704ad221' | |
REDIS.hgetall('vision:episode:123456:fields'). | |
must_equal({ "foo" => "bar", "baz" => "qux" }) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment