From 1bca1b921b134c02693966ea60604ebd7cae57b0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 4 Aug 2017 16:24:44 +0200 Subject: [PATCH] Fix import tests. --- .../Controllers/Import/FileControllerTest.php | 215 ++++++++++++++++++ .../Controllers/ImportControllerTest.php | 195 ---------------- 2 files changed, 215 insertions(+), 195 deletions(-) create mode 100644 tests/Feature/Controllers/Import/FileControllerTest.php diff --git a/tests/Feature/Controllers/Import/FileControllerTest.php b/tests/Feature/Controllers/Import/FileControllerTest.php new file mode 100644 index 0000000000..0c8ad37202 --- /dev/null +++ b/tests/Feature/Controllers/Import/FileControllerTest.php @@ -0,0 +1,215 @@ +mock(CsvConfigurator::class); + $configurator->shouldReceive('setJob')->once(); + $configurator->shouldReceive('isJobConfigured')->once()->andReturn(false); + $configurator->shouldReceive('getNextView')->once()->andReturn('import.csv.initial'); + $configurator->shouldReceive('getNextData')->andReturn(['specifics' => [], 'delimiters' => [], 'accounts' => []])->once(); + + + $this->be($this->user()); + $response = $this->get(route('import.file.configure', ['configure'])); + $response->assertStatus(200); + $response->assertSee('