Commit 58a44b27 authored by Angelo Gulina's avatar Angelo Gulina

Trim the value from the input

parent 11a4bfc7
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
</label> </label>
<gl-form-input <gl-form-input
id="activation-code-group" id="activation-code-group"
v-model="form.fields.activationCode.value" v-model.trim="form.fields.activationCode.value"
v-validation:[form.showValidation] v-validation:[form.showValidation]
:disabled="isLoading" :disabled="isLoading"
:placeholder="$options.i18n.pasteActivationCode" :placeholder="$options.i18n.pasteActivationCode"
......
...@@ -22,7 +22,8 @@ localVue.use(VueApollo); ...@@ -22,7 +22,8 @@ localVue.use(VueApollo);
describe('CloudLicenseApp', () => { describe('CloudLicenseApp', () => {
let wrapper; let wrapper;
const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT'; const fakeActivationCode = 'gEg959hDCkvM2d4Der5RyktT ';
const fakeActivationCodeTrimmed = 'gEg959hDCkvM2d4Der5RyktT';
const createMockApolloProvider = (resolverMock) => { const createMockApolloProvider = (resolverMock) => {
localVue.use(VueApollo); localVue.use(VueApollo);
...@@ -133,7 +134,7 @@ describe('CloudLicenseApp', () => { ...@@ -133,7 +134,7 @@ describe('CloudLicenseApp', () => {
it('calls mutate with the correct variables', () => { it('calls mutate with the correct variables', () => {
expect(mutationMock).toHaveBeenCalledWith({ expect(mutationMock).toHaveBeenCalledWith({
gitlabSubscriptionActivateInput: { gitlabSubscriptionActivateInput: {
activationCode: fakeActivationCode, activationCode: fakeActivationCodeTrimmed,
}, },
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment