summaryrefslogtreecommitdiff
path: root/spec/frontend/create_cluster/eks_cluster/store/getters_spec.js
blob: 46c37961dd3de468d7bed1fe134c9f99c86cefab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { subnetValid } from '~/create_cluster/eks_cluster/store/getters';

describe('EKS Cluster Store Getters', () => {
  describe('subnetValid', () => {
    it('returns true if there are 2 or more selected subnets', () => {
      expect(subnetValid({ selectedSubnet: [1, 2] })).toBe(true);
    });

    it.each([[[], [1]]])('returns false if there are 1 or less selected subnets', (subnets) => {
      expect(subnetValid({ selectedSubnet: subnets })).toBe(false);
    });
  });
});