diff options
Diffstat (limited to 'spec/services/packages/npm')
-rw-r--r-- | spec/services/packages/npm/create_package_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/packages/npm/create_tag_service_spec.rb | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/spec/services/packages/npm/create_package_service_spec.rb b/spec/services/packages/npm/create_package_service_spec.rb index 5b41055397b..a3e59913918 100644 --- a/spec/services/packages/npm/create_package_service_spec.rb +++ b/spec/services/packages/npm/create_package_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' RSpec.describe Packages::Npm::CreatePackageService do - let(:namespace) {create(:namespace)} + let(:namespace) { create(:namespace) } let(:project) { create(:project, namespace: namespace) } let(:user) { create(:user) } let(:version) { '1.0.1' } @@ -129,7 +129,7 @@ RSpec.describe Packages::Npm::CreatePackageService do end describe 'max file size validation' do - let(:max_file_size) { 5.bytes} + let(:max_file_size) { 5.bytes } shared_examples_for 'max file size validation failure' do it 'returns a 400 error', :aggregate_failures do @@ -160,7 +160,7 @@ RSpec.describe Packages::Npm::CreatePackageService do end context "when encoded package data is padded with '='" do - let(:max_file_size) { 4.bytes} + let(:max_file_size) { 4.bytes } # 'Hello' (size = 5 bytes) => 'SGVsbG8=' let(:encoded_package_data) { 'SGVsbG8=' } @@ -168,7 +168,7 @@ RSpec.describe Packages::Npm::CreatePackageService do end context "when encoded package data is padded with '=='" do - let(:max_file_size) { 3.bytes} + let(:max_file_size) { 3.bytes } # 'Hell' (size = 4 bytes) => 'SGVsbA==' let(:encoded_package_data) { 'SGVsbA==' } diff --git a/spec/services/packages/npm/create_tag_service_spec.rb b/spec/services/packages/npm/create_tag_service_spec.rb index e7a784068fa..a4b07bf97cc 100644 --- a/spec/services/packages/npm/create_tag_service_spec.rb +++ b/spec/services/packages/npm/create_tag_service_spec.rb @@ -11,6 +11,7 @@ RSpec.describe Packages::Npm::CreateTagService do shared_examples 'it creates the tag' do it { expect { subject }.to change { Packages::Tag.count }.by(1) } it { expect(subject.name).to eq(tag_name) } + it 'adds tag to the package' do tag = subject expect(package.reload.tags).to match_array([tag]) |