From 281a08a99f29de0d37e1f41eb162eaca2ad7171e Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 17 Jun 2013 15:57:13 -0400 Subject: [PATCH] Allow people to capitalize a word when ninja-editing a post --- app/models/post.rb | 2 +- spec/models/post_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 55e934e5560..95b4070b5f0 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -72,7 +72,7 @@ class Post < ActiveRecord::Base def raw_hash return if raw.blank? - Digest::SHA1.hexdigest(raw.gsub(/\s+/, "").downcase) + Digest::SHA1.hexdigest(raw.gsub(/\s+/, "")) end def reset_cooked diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index 70521715896..2a8b5dd3fed 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -417,8 +417,8 @@ describe Post do post.raw_hash.should == post_with_body(" thisis ourt est postbody").raw_hash end - it "returns the same hash even with different text case" do - post.raw_hash.should == post_with_body("THIS is OUR TEST post BODy").raw_hash + it "returns a different value with different text case" do + post.raw_hash.should_not == post_with_body("THIS is OUR TEST post BODy").raw_hash end end