Skip to content

Commit

Permalink
GDB-6329 - revert changes to unit tests, which don't run in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DesiBorisova committed May 13, 2024
1 parent 6a8499a commit 3316e94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
15 changes: 4 additions & 11 deletions test/namespaces/controllers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ describe('=> NamespacesCtrl tests', function () {
toastr,
httpGetNamespaces,
modalInstance,
$translate,
$licenseService;
$translate;

beforeEach(angular.mock.inject(function (_$httpBackend_, _$repositories_, _RDF4JRepositoriesRestService_, _toastr_, _$location_, _$controller_, _$window_, _$timeout_, $rootScope, $q, _$translate_, _$licenseService_) {
beforeEach(angular.mock.inject(function (_$httpBackend_, _$repositories_, _RDF4JRepositoriesRestService_, _toastr_, _$location_, _$controller_, _$window_, _$timeout_, $rootScope, $q, _$translate_) {
$httpBackend = _$httpBackend_;
$controller = _$controller_;
$timeout = _$timeout_;
Expand All @@ -35,18 +34,13 @@ describe('=> NamespacesCtrl tests', function () {
toastr = _toastr_;
$scope = $rootScope.$new();
$translate = _$translate_;
$licenseService = _$licenseService_;

$translate.instant = function (key) {
return bundle[key];
};

modalInstance = new FakeModal($q, $rootScope);
$licenseService.isLicenseValid = function () {
return true;
}
$httpBackend.when('GET', 'rest/graphdb-settings/license').respond(200, 'licenseinfo');
$httpBackend.when('GET', 'rest/graphdb-settings/license/hardcoded').respond(200, 'true');

$httpBackend.when('GET', 'rest/locations').respond(200, {});

$repositories.getActiveRepositoryObject = function () {
Expand Down Expand Up @@ -106,8 +100,7 @@ describe('=> NamespacesCtrl tests', function () {
return modalInstance;
}
},
$translate: $translate,
$licenseService: $licenseService
$translate: $translate
});
}));

Expand Down
8 changes: 1 addition & 7 deletions test/resource/controllers.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ describe('=> EditResourceCtrl', function () {
StatementsService,
$scope,
$translate;
$licenseService;

beforeEach(angular.mock.inject(function (_$repositories_, _$httpBackend_, _$location_, _$controller_, _$window_,
_$timeout_, _ClassInstanceDetailsService_, _StatementsService_, $rootScope,
_$translate_, _$licenseService_) {
beforeEach(angular.mock.inject(function (_$repositories_, _$httpBackend_, _$location_, _$controller_, _$window_, _$timeout_, _ClassInstanceDetailsService_, _StatementsService_, $rootScope, _$translate_) {
$repositories = _$repositories_;
$httpBackend = _$httpBackend_;
$location = _$location_;
Expand All @@ -36,15 +33,12 @@ describe('=> EditResourceCtrl', function () {
StatementsService = _StatementsService_;
$scope = $rootScope.$new();
$translate = _$translate_;
$licenseService = _$licenseService_;

$translate.instant = function (key) {
return bundle[key];
}

$httpBackend.when('GET', 'rest/locations').respond(200, {});
$httpBackend.when('GET', 'rest/graphdb-settings/license').respond(200, 'licenseinfo');
$httpBackend.when('GET', 'rest/graphdb-settings/license/hardcoded').respond(200, 'true');

$controller('EditResourceCtrl', {$scope: $scope, $translate: $translate});

Expand Down

0 comments on commit 3316e94

Please sign in to comment.