mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Merge pull request #135 from inventree/unit-testing
Unit testing
(cherry picked from commit d55f594342)
This commit is contained in:
parent
10b435f4fa
commit
cfc9f09b80
35 changed files with 893 additions and 317 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import "dart:io";
|
||||
|
||||
import "package:device_info_plus/device_info_plus.dart";
|
||||
import "package:inventree/app_settings.dart";
|
||||
import "package:inventree/preferences.dart";
|
||||
import "package:package_info_plus/package_info_plus.dart";
|
||||
import "package:sentry_flutter/sentry_flutter.dart";
|
||||
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
Map<String, dynamic> data = {};
|
||||
|
||||
// Note: Format of adjustment API was updated in API v14
|
||||
if (api.supportModernStockTransactions()) {
|
||||
if (api.supportsModernStockTransactions) {
|
||||
// Modern (> 14) API
|
||||
data = {
|
||||
"items": [
|
||||
|
|
@ -560,7 +560,7 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
}
|
||||
|
||||
// Expected API return code depends on server API version
|
||||
final int expected_response = api.supportModernStockTransactions() ? 201 : 200;
|
||||
final int expected_response = api.supportsModernStockTransactions ? 201 : 200;
|
||||
|
||||
var response = await api.post(
|
||||
endpoint,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue