changing action name for getting offices in alphabetical order

This commit is contained in:
Vishwas Babu A J 2014-12-04 10:41:17 -08:00
parent 5020c334b1
commit 95e1bfa84a
3 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@
CreateEmployeeController: function (scope, resourceFactory, location, dateFilter) {
scope.offices = [];
scope.restrictDate = new Date();
resourceFactory.officeResource.getAllOfficesAlphabetically(function (data) {
resourceFactory.officeResource.getAllOfficesInAlphabeticalOrder(function (data) {
scope.offices = data;
scope.formData = {
isLoanOfficer: true,

View File

@ -34,7 +34,7 @@
}),
officeResource: defineResource(apiVer + "/offices/:officeId", {officeId: "@officeId"}, {
getAllOffices: {method: 'GET', params: {}, isArray: true},
getAllOfficesAlphabetically: {method: 'GET', params: {orderBy: 'name', sortOrder: 'ASC'}, isArray: true},
getAllOfficesInAlphabeticalOrder: {method: 'GET', params: {orderBy: 'name', sortOrder: 'ASC'}, isArray: true},
update: { method: 'PUT'}
}),
clientResource: defineResource(apiVer + "/clients/:clientId/:anotherresource", {clientId: '@clientId', anotherresource: '@anotherresource'}, {

View File

@ -33,7 +33,7 @@ describe("ResourceFactoryProvider", function () {
it("should define the Office resource", function () {
expect(ngResource).toHaveBeenCalledWith(apiVersion + "/offices/:officeId", {officeId: "@officeId"}, {
getAllOffices: {method: 'GET', params: {}, isArray: true},
getAllOfficesAlphabetically: {method: 'GET', params: {orderBy: 'name', sortOrder: 'ASC'}, isArray: true},
getAllOfficesInAlphabeticalOrder: {method: 'GET', params: {orderBy: 'name', sortOrder: 'ASC'}, isArray: true},
update: {method: 'PUT'}
});
expect(this.factory.officeResource).toEqual("test_resource");