summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-16 13:35:03 +0000
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2018-03-16 13:35:03 +0000
commitc1e3942122eab23734e102d5690ae94d8a702881 (patch)
tree650e1bea33ccaba343745a65cd0fc459bfea2770 /spec
parent9d32fccfa77effd52f40a0783ca4ce8caccde8de (diff)
downloadgitlab-ce-c1e3942122eab23734e102d5690ae94d8a702881.tar.gz
Extract constant for LfsPointerFile::VERSION_LINE
Diffstat (limited to 'spec')
-rw-r--r--spec/services/files/create_service_spec.rb4
-rw-r--r--spec/services/files/multi_service_spec.rb4
-rw-r--r--spec/services/lfs/file_transformer_spec.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/spec/services/files/create_service_spec.rb b/spec/services/files/create_service_spec.rb
index 030263b1502..abe99b9e794 100644
--- a/spec/services/files/create_service_spec.rb
+++ b/spec/services/files/create_service_spec.rb
@@ -43,7 +43,7 @@ describe Files::CreateService do
blob = repository.blob_at('lfs', file_path)
- expect(blob.data).not_to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(blob.data).not_to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
expect(blob.data).to eq(file_content)
end
end
@@ -58,7 +58,7 @@ describe Files::CreateService do
blob = repository.blob_at('lfs', file_path)
- expect(blob.data).to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(blob.data).to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
end
it "creates an LfsObject with the file's content" do
diff --git a/spec/services/files/multi_service_spec.rb b/spec/services/files/multi_service_spec.rb
index 0dc92762d64..59984c10990 100644
--- a/spec/services/files/multi_service_spec.rb
+++ b/spec/services/files/multi_service_spec.rb
@@ -126,7 +126,7 @@ describe Files::MultiService do
blob = repository.blob_at('lfs', new_file_path)
- expect(blob.data).to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(blob.data).to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
end
it "creates an LfsObject with the file's content" do
@@ -145,7 +145,7 @@ describe Files::MultiService do
blob = repository.blob_at('lfs', new_file_path)
- expect(blob.data).to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(blob.data).to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
end
it "creates an LfsObject with the file's content" do
diff --git a/spec/services/lfs/file_transformer_spec.rb b/spec/services/lfs/file_transformer_spec.rb
index 00c5328a3a0..e8938338cb7 100644
--- a/spec/services/lfs/file_transformer_spec.rb
+++ b/spec/services/lfs/file_transformer_spec.rb
@@ -53,7 +53,7 @@ describe Lfs::FileTransformer do
it 'returns an LFS pointer' do
result = subject.new_file(file_path, file_content)
- expect(result.content).to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(result.content).to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
end
it 'returns LFS pointer encoding as text' do
@@ -68,7 +68,7 @@ describe Lfs::FileTransformer do
it "doesn't create LFS pointers" do
new_content = subject.new_file(file_path, file_content).content
- expect(new_content).not_to start_with('version https://git-lfs.github.com/spec/v1')
+ expect(new_content).not_to start_with(Gitlab::Git::LfsPointerFile::VERSION_LINE)
expect(new_content).to eq(file_content)
end
end