Skip to content

Commit

Permalink
Merge pull request #11 from mathewmeconry/hotfix/search_criteria
Browse files Browse the repository at this point in the history
renames operator to cirteria
  • Loading branch information
mathewmeconry authored Jul 22, 2019
2 parents b69fec8 + 2ea44b4 commit 0022c89
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/interfaces/BaseStatic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export namespace BaseStatic {
content: string;
}

export type SearchOperator =
export type SearchCriteria =
| "="
| "!="
| ">"
Expand All @@ -27,7 +27,7 @@ export namespace BaseStatic {
export interface SearchParameter<T> {
field: T;
value: any;
operator: SearchOperator;
criteria?: SearchCriteria;
}

export interface BaseOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Bills.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe("Bills", function() {

it("search bill", async () => {
const searchResult = await moduleToTest.search({}, [
{ field: BillsStatic.SearchParameters.id, value: bill.id, operator: "=" }
{ field: BillsStatic.SearchParameters.id, value: bill.id, criteria: "=" }
]);
expect(searchResult.length).to.be.eq(1);
expect(searchResult[0].id).to.be.eq(bill.id);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Contact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe("Contacts", function() {
{
field: ContactsStatic.ContactSearchParameters.id,
value: contact.id,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ContactGroups.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe("ContactGroups", function() {
{
field: ContactGroupsStatic.ContactGroupSearchParameters.name,
value: contactGroup.name,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ContactRelations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("ContactRelations", function() {
field:
ContactRelationsStatic.ContactRelationSearchParameters.contact_id,
value: 1,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ContactSectors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("ContactSectors", function() {
{
field: ContactSectorsStatic.ContactSectorSearchParameters.name,
value: contactSector.name,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ContactTypes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe("ContactTypes", function() {
{
field: ContactTypesStatic.ContactTypeSearchParameters.name,
value: contactType.name,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Expenses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe("Expenses", function() {
{
field: ExpensesStatic.SearchParameters.id,
value: expense.id,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Orders.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe("Orders", function() {
{
field: OrdersStatic.OrderSearchParameters.id,
value: order.id,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/TimetrackingStatuses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe("TimetrackingStatuses", function() {
field:
TimetrackingStatusesStatic.TimetrackingStatusesSearchparameters.name,
value: timetrackingStatusEntry.name,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.greaterThan(0);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Timetrackings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("Timetracking", function() {
{
field: TimetrackingsStatic.TimetrackingsSearchParameters.id,
value: timetrackingEntry.id,
operator: "="
criteria: "="
}
]);
expect(searchResult.length).to.be.eq(1);
Expand Down

0 comments on commit 0022c89

Please sign in to comment.