diff --git a/app/helpers/pages_helper.rb b/app/helpers/pages_helper.rb index 3eaafbdc..51a9423f 100644 --- a/app/helpers/pages_helper.rb +++ b/app/helpers/pages_helper.rb @@ -7,6 +7,6 @@ def git_commit_sha def git_commit_sha_short full_sha = git_commit_sha - full_sha[-7..] + full_sha[...7] end end diff --git a/spec/system/pages_spec.rb b/spec/system/pages_spec.rb index ff8de8e8..a34147d1 100644 --- a/spec/system/pages_spec.rb +++ b/spec/system/pages_spec.rb @@ -19,7 +19,7 @@ context "when .source_version file does not exist" do let(:sha) { "94d92356828a56db25fccff9d50f41c525eead5x" } - let(:expected_text) { "5eead5x" } + let(:expected_text) { "94d9235" } before do # stub this method since we need to control what the sha actually is @@ -31,7 +31,7 @@ context "when .source_version file exists" do let(:sha) { "94d92356828a56db25fccff9d50f41c525eead5y" } - let(:expected_text) { "5eead5y" } + let(:expected_text) { "94d9235" } before { `cd #{Rails.root} && echo #{sha} > .source_version` }