Skip to content
代码片段 群组 项目
未验证 提交 9103ced1 编辑于 作者: Gerardo Navarro's avatar Gerardo Navarro 提交者: GitLab
浏览文件

test: Fix wrong param for shared example 'error service response'

- Fixing the wrong usage of
  shared example 'returning an error service response',
  see https://gitlab.com/gitlab-community/gitlab/-/blob/fdf61409f4e8ad44118cd82e987ad76045ef37a6/spec/support/shared_examples/services/service_response_shared_examples.rb#L3
- Currently in the test file `Pypi::CreatePackageService`,
  the assertion is ignored because the param `:message`
  is passed in the wrong way

Changelog: other
上级 8159d190
No related branches found
No related tags found
无相关合并请求
......@@ -113,7 +113,8 @@
context 'with an invalid metadata' do
let(:requires_python) { 'x' * 256 }
it_behaves_like 'returning an error service response', /Pypi package metadata invalid/ do
it_behaves_like 'returning an error service response',
message: 'Validation failed: Required python is too long (maximum is 255 characters)' do
it { is_expected.to have_attributes(reason: :invalid_parameter) }
end
end
......@@ -142,7 +143,8 @@
params[:md5_digest] = md5
end
it_behaves_like 'returning an error service response', /File name has already been taken/ do
it_behaves_like 'returning an error service response',
message: 'Validation failed: File name has already been taken' do
it { is_expected.to have_attributes(reason: :invalid_parameter) }
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册