logs_test.dart 668 Bytes
Newer Older
1 2 3 4
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

5
import 'package:flutter_tools/src/commands/logs.dart';
6 7
import 'package:test/test.dart';

8 9
import 'src/common.dart';
import 'src/context.dart';
10
import 'src/mocks.dart';
11

12
void main() {
13
  group('logs', () {
14
    testUsingContext('fail with a bad device id', () {
15 16
      LogsCommand command = new LogsCommand();
      applyMocksToCommand(command);
17
      return createTestCommandRunner(command).run(<String>['-d', 'abc123', 'logs']).then((int code) {
Devon Carew's avatar
Devon Carew committed
18 19
        expect(code, equals(1));
      });
20 21 22
    });
  });
}