Skip to content

Commit 181c6af

Browse files
committed
fix: tests alignment
1 parent f3de90c commit 181c6af

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

tools/spectral/ipa/__tests__/deleteMethod204Response.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import testRule from './__helpers__/testRule';
22
import { DiagnosticSeverity } from '@stoplight/types';
33

4-
testRule('xgen-IPA-108-delete-204-response', [
4+
testRule('xgen-IPA-108-delete-method-return-204-response', [
55
{
66
name: 'valid DELETE with 204',
77
document: {
@@ -36,7 +36,7 @@ testRule('xgen-IPA-108-delete-204-response', [
3636
},
3737
errors: [
3838
{
39-
code: 'xgen-IPA-108-delete-204-response',
39+
code: 'xgen-IPA-108-delete-method-return-204-response',
4040
message: 'DELETE method should return 204 No Content status code http://go/ipa/108',
4141
path: ['paths', '/resource/{id}'],
4242
severity: DiagnosticSeverity.Error,
@@ -50,7 +50,7 @@ testRule('xgen-IPA-108-delete-204-response', [
5050
'/resource/{id}': {
5151
delete: {
5252
'x-xgen-IPA-exception': {
53-
'xgen-IPA-108-delete-204-response': 'Legacy API',
53+
'xgen-IPA-108-delete-method-return-204-response': 'Legacy API',
5454
},
5555
responses: {
5656
200: {

tools/spectral/ipa/__tests__/deleteMethod404Response.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import testRule from './__helpers__/testRule';
22
import { DiagnosticSeverity } from '@stoplight/types';
33

4-
testRule('xgen-IPA-108-delete-404-response', [
4+
testRule('xgen-IPA-108-delete-include-404-response', [
55
{
66
name: 'valid DELETE with 404',
77
document: {
@@ -35,7 +35,7 @@ testRule('xgen-IPA-108-delete-404-response', [
3535
},
3636
errors: [
3737
{
38-
code: 'xgen-IPA-108-delete-404-response',
38+
code: 'xgen-IPA-108-delete-include-404-response',
3939
message: 'DELETE method should include 404 status code for not found resources http://go/ipa/108',
4040
path: ['paths', '/resource/{id}'],
4141
severity: DiagnosticSeverity.Error,
@@ -49,7 +49,7 @@ testRule('xgen-IPA-108-delete-404-response', [
4949
'/resource/{id}': {
5050
delete: {
5151
'x-xgen-IPA-exception': {
52-
'xgen-IPA-108-delete-404-response': 'Idempotent delete',
52+
'xgen-IPA-108-delete-include-404-response': 'Idempotent delete',
5353
},
5454
responses: {
5555
204: {},

tools/spectral/ipa/__tests__/deleteMethodNoRequestBody.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import testRule from './__helpers__/testRule';
22
import { DiagnosticSeverity } from '@stoplight/types';
33

4-
testRule('xgen-IPA-108-delete-no-body', [
4+
testRule('xgen-IPA-108-delete-request-no-body', [
55
{
66
name: 'valid DELETE without body',
77
document: {
@@ -39,7 +39,7 @@ testRule('xgen-IPA-108-delete-no-body', [
3939
},
4040
errors: [
4141
{
42-
code: 'xgen-IPA-108-delete-no-body',
42+
code: 'xgen-IPA-108-delete-request-no-body',
4343
message: 'DELETE method should not have a request body http://go/ipa/108',
4444
path: ['paths', '/resource/{id}'],
4545
severity: DiagnosticSeverity.Error,
@@ -53,7 +53,7 @@ testRule('xgen-IPA-108-delete-no-body', [
5353
'/resource/{id}': {
5454
delete: {
5555
'x-xgen-IPA-exception': {
56-
'xgen-IPA-108-delete-no-body': 'Bulk delete operation',
56+
'xgen-IPA-108-delete-request-no-body': 'Bulk delete operation',
5757
},
5858
requestBody: {
5959
content: {

tools/spectral/ipa/__tests__/deleteMethodResponseShouldBeVoid.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import testRule from './__helpers__/testRule';
22
import { DiagnosticSeverity } from '@stoplight/types';
33

4-
testRule('xgen-IPA-108-delete-response-should-be-void', [
4+
testRule('xgen-IPA-108-delete-response-should-be-empty', [
55
{
66
name: 'valid DELETE with void 204',
77
document: {
@@ -38,7 +38,7 @@ testRule('xgen-IPA-108-delete-response-should-be-void', [
3838
},
3939
errors: [
4040
{
41-
code: 'xgen-IPA-108-delete-response-should-be-void',
41+
code: 'xgen-IPA-108-delete-response-should-be-empty',
4242
message: 'DELETE method should return an empty response http://go/ipa/108',
4343
path: ['paths', '/resource/{id}'],
4444
severity: DiagnosticSeverity.Error,
@@ -52,7 +52,7 @@ testRule('xgen-IPA-108-delete-response-should-be-void', [
5252
'/resource/{id}': {
5353
delete: {
5454
'x-xgen-IPA-exception': {
55-
'xgen-IPA-108-delete-response-should-be-void': 'Legacy API',
55+
'xgen-IPA-108-delete-response-should-be-empty': 'Legacy API',
5656
},
5757
responses: {
5858
204: {

tools/spectral/ipa/rulesets/IPA-108.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# http://go/ipa/108
33

44
rules:
5-
xgen-IPA-108-delete-response-should-be-void:
5+
xgen-IPA-108-delete-response-should-be-empty:
66
description: Delete method response must be empty http://go/ipa/108
77
message: '{{error}} http://go/ipa/108'
88
severity: warn

0 commit comments

Comments
 (0)