Skip to content

Commit

Permalink
Merge pull request #163 from screwdriver-cd/tagtag
Browse files Browse the repository at this point in the history
fix: remove schema for delete and create tag
  • Loading branch information
d2lam authored Jul 19, 2017
2 parents 1929050 + 3c53c22 commit a6daa8d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 46 deletions.
19 changes: 0 additions & 19 deletions models/templateTag.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const Joi = require('joi');
const mutate = require('../lib/mutate');
const Template = require('../config/template');

const MODEL = {
Expand All @@ -27,24 +26,6 @@ module.exports = {
*/
base: Joi.object(MODEL).label('TemplateTag'),

/**
* Properties for template tag that will be passed during a CREATE request
*
* @property create
* @type {Joi}
*/
create: Joi.object(mutate(MODEL, ['name', 'tag', 'version'], []))
.label('Create Template Tag'),

/**
* Properties for template tag that will be passed during a DELETE request
*
* @property remove
* @type {Joi}
*/
remove: Joi.object(mutate(MODEL, ['name', 'tag'], []))
.label('Remove Template Tag'),

/**
* List of fields that determine a unique row
*
Expand Down
4 changes: 0 additions & 4 deletions test/data/templatetag.create.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions test/data/templatetag.remove.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions test/models/templatetag.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,4 @@ describe('model template tag', () => {
assert.isNull(validate('templatetag.yaml', models.templateTag.base).error);
});
});

describe('create', () => {
it('validates the create', () => {
assert.isNull(validate('templatetag.create.yaml', models.templateTag.create).error);
});

it('fails the create', () => {
assert.isNotNull(validate('empty.yaml', models.templateTag.create).error);
});
});

describe('remove', () => {
it('validates the remove', () => {
assert.isNull(validate('templatetag.remove.yaml', models.templateTag.remove).error);
});

it('fails the remove', () => {
assert.isNotNull(validate('empty.yaml', models.templateTag.remove).error);
});
});
});

0 comments on commit a6daa8d

Please sign in to comment.