diff options
author | kushalpandya <kushal@gitlab.com> | 2017-10-13 11:36:25 +0300 |
---|---|---|
committer | kushalpandya <kushal@gitlab.com> | 2017-10-13 11:36:25 +0300 |
commit | d72b95cfb7a538c9385f373747e3675de8acb980 (patch) | |
tree | 97ba6819598f2e63d76da4e8676d74279a26849f /spec/javascripts/groups | |
parent | 92ed1fecdcc621b7940466becb4d10de56ec20f2 (diff) |
Add support for `archived` param
Diffstat (limited to 'spec/javascripts/groups')
-rw-r--r-- | spec/javascripts/groups/components/app_spec.js | 7 | ||||
-rw-r--r-- | spec/javascripts/groups/components/groups_spec.js | 2 | ||||
-rw-r--r-- | spec/javascripts/groups/service/groups_service_spec.js | 5 |
3 files changed, 9 insertions, 5 deletions
diff --git a/spec/javascripts/groups/components/app_spec.js b/spec/javascripts/groups/components/app_spec.js index 8472c726b08..cd19a0fae1e 100644 --- a/spec/javascripts/groups/components/app_spec.js +++ b/spec/javascripts/groups/components/app_spec.js @@ -102,9 +102,10 @@ describe('AppComponent', () => { page: 2, filterGroupsBy: 'git', sortBy: 'created_desc', + archived: true, }); setTimeout(() => { - expect(vm.service.getGroups).toHaveBeenCalledWith(1, 2, 'git', 'created_desc'); + expect(vm.service.getGroups).toHaveBeenCalledWith(1, 2, 'git', 'created_desc', true); done(); }, 0); }); @@ -162,6 +163,7 @@ describe('AppComponent', () => { filterGroupsBy: null, sortBy: null, updatePagination: true, + archived: null, }); setTimeout(() => { expect(vm.updateGroups).toHaveBeenCalled(); @@ -178,13 +180,14 @@ describe('AppComponent', () => { spyOn(window.history, 'replaceState'); spyOn($, 'scrollTo'); - vm.fetchPage(2, null, null); + vm.fetchPage(2, null, null, true); expect(vm.isLoading).toBeTruthy(); expect(vm.fetchGroups).toHaveBeenCalledWith({ page: 2, filterGroupsBy: null, sortBy: null, updatePagination: true, + archived: true, }); setTimeout(() => { expect(vm.isLoading).toBeFalsy(); diff --git a/spec/javascripts/groups/components/groups_spec.js b/spec/javascripts/groups/components/groups_spec.js index 280376d4903..90e818c1545 100644 --- a/spec/javascripts/groups/components/groups_spec.js +++ b/spec/javascripts/groups/components/groups_spec.js @@ -43,7 +43,7 @@ describe('GroupsComponent', () => { spyOn(eventHub, '$emit').and.stub(); vm.change(2); - expect(eventHub.$emit).toHaveBeenCalledWith('fetchPage', 2, jasmine.any(Object), jasmine.any(Object)); + expect(eventHub.$emit).toHaveBeenCalledWith('fetchPage', 2, jasmine.any(Object), jasmine.any(Object), jasmine.any(Object)); }); }); }); diff --git a/spec/javascripts/groups/service/groups_service_spec.js b/spec/javascripts/groups/service/groups_service_spec.js index 222e75d24a4..20bb63687f7 100644 --- a/spec/javascripts/groups/service/groups_service_spec.js +++ b/spec/javascripts/groups/service/groups_service_spec.js @@ -20,12 +20,13 @@ describe('GroupsService', () => { page: 2, filter: 'git', sort: 'created_asc', + archived: true, }; - service.getGroups(55, 2, 'git', 'created_asc'); + service.getGroups(55, 2, 'git', 'created_asc', true); expect(service.groups.get).toHaveBeenCalledWith({ parent_id: 55 }); - service.getGroups(null, 2, 'git', 'created_asc'); + service.getGroups(null, 2, 'git', 'created_asc', true); expect(service.groups.get).toHaveBeenCalledWith(queryParams); }); }); |