summaryrefslogtreecommitdiff
path: root/spec/models/repository_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index c5ab7e57272..0bd17dbacd7 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -844,6 +844,19 @@ describe Repository do
end
end
+ describe '#get_raw_changes' do
+ context `with non-UTF8 bytes in paths` do
+ let(:old_rev) { 'd0888d297eadcd7a345427915c309413b1231e65' }
+ let(:new_rev) { '19950f03c765f7ac8723a73a0599764095f52fc0' }
+ let(:changes) { repository.raw_changes_between(old_rev, new_rev) }
+
+ it 'returns the changes' do
+ expect { changes }.not_to raise_error
+ expect(changes.first.new_path.bytes).to eq("hello\x80world".bytes)
+ end
+ end
+ end
+
describe '#create_ref' do
it 'redirects the call to write_ref' do
ref, ref_path = '1', '2'