Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-20 21:33:35 +0300
committerDouwe Maan <douwe@gitlab.com>2015-08-20 21:33:35 +0300
commit991c9f6fdab46909fbbe652b1c88a6521a969c02 (patch)
tree4800ca6705cc53fee3ceff49bbe9bc376a003f3c /spec/services
parent2f78b5e8afbf0024211bbd5bfe3a6c6f53b2421e (diff)
Test Email::AttachmentUploader.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/projects/upload_service_spec.rb48
1 files changed, 24 insertions, 24 deletions
diff --git a/spec/services/projects/upload_service_spec.rb b/spec/services/projects/upload_service_spec.rb
index 7aa26857649..fa4ff6b01ad 100644
--- a/spec/services/projects/upload_service_spec.rb
+++ b/spec/services/projects/upload_service_spec.rb
@@ -13,13 +13,13 @@ describe Projects::UploadService do
@link_to_file = upload_file(@project.repository, gif)
end
- it { expect(@link_to_file).to have_key('alt') }
- it { expect(@link_to_file).to have_key('url') }
- it { expect(@link_to_file).to have_key('is_image') }
+ it { expect(@link_to_file).to have_key(:alt) }
+ it { expect(@link_to_file).to have_key(:url) }
+ it { expect(@link_to_file).to have_key(:is_image) }
it { expect(@link_to_file).to have_value('banana_sample') }
- it { expect(@link_to_file['is_image']).to equal(true) }
- it { expect(@link_to_file['url']).to match("/#{@project.path_with_namespace}") }
- it { expect(@link_to_file['url']).to match('banana_sample.gif') }
+ it { expect(@link_to_file[:is_image]).to equal(true) }
+ it { expect(@link_to_file[:url]).to match("/#{@project.path_with_namespace}") }
+ it { expect(@link_to_file[:url]).to match('banana_sample.gif') }
end
context 'for valid png file' do
@@ -29,13 +29,13 @@ describe Projects::UploadService do
@link_to_file = upload_file(@project.repository, png)
end
- it { expect(@link_to_file).to have_key('alt') }
- it { expect(@link_to_file).to have_key('url') }
+ it { expect(@link_to_file).to have_key(:alt) }
+ it { expect(@link_to_file).to have_key(:url) }
it { expect(@link_to_file).to have_value('dk') }
- it { expect(@link_to_file).to have_key('is_image') }
- it { expect(@link_to_file['is_image']).to equal(true) }
- it { expect(@link_to_file['url']).to match("/#{@project.path_with_namespace}") }
- it { expect(@link_to_file['url']).to match('dk.png') }
+ it { expect(@link_to_file).to have_key(:is_image) }
+ it { expect(@link_to_file[:is_image]).to equal(true) }
+ it { expect(@link_to_file[:url]).to match("/#{@project.path_with_namespace}") }
+ it { expect(@link_to_file[:url]).to match('dk.png') }
end
context 'for valid jpg file' do
@@ -44,13 +44,13 @@ describe Projects::UploadService do
@link_to_file = upload_file(@project.repository, jpg)
end
- it { expect(@link_to_file).to have_key('alt') }
- it { expect(@link_to_file).to have_key('url') }
- it { expect(@link_to_file).to have_key('is_image') }
+ it { expect(@link_to_file).to have_key(:alt) }
+ it { expect(@link_to_file).to have_key(:url) }
+ it { expect(@link_to_file).to have_key(:is_image) }
it { expect(@link_to_file).to have_value('rails_sample') }
- it { expect(@link_to_file['is_image']).to equal(true) }
- it { expect(@link_to_file['url']).to match("/#{@project.path_with_namespace}") }
- it { expect(@link_to_file['url']).to match('rails_sample.jpg') }
+ it { expect(@link_to_file[:is_image]).to equal(true) }
+ it { expect(@link_to_file[:url]).to match("/#{@project.path_with_namespace}") }
+ it { expect(@link_to_file[:url]).to match('rails_sample.jpg') }
end
context 'for txt file' do
@@ -59,13 +59,13 @@ describe Projects::UploadService do
@link_to_file = upload_file(@project.repository, txt)
end
- it { expect(@link_to_file).to have_key('alt') }
- it { expect(@link_to_file).to have_key('url') }
- it { expect(@link_to_file).to have_key('is_image') }
+ it { expect(@link_to_file).to have_key(:alt) }
+ it { expect(@link_to_file).to have_key(:url) }
+ it { expect(@link_to_file).to have_key(:is_image) }
it { expect(@link_to_file).to have_value('doc_sample.txt') }
- it { expect(@link_to_file['is_image']).to equal(false) }
- it { expect(@link_to_file['url']).to match("/#{@project.path_with_namespace}") }
- it { expect(@link_to_file['url']).to match('doc_sample.txt') }
+ it { expect(@link_to_file[:is_image]).to equal(false) }
+ it { expect(@link_to_file[:url]).to match("/#{@project.path_with_namespace}") }
+ it { expect(@link_to_file[:url]).to match('doc_sample.txt') }
end
context 'for too large a file' do