Skip to content
Snippets Groups Projects
Commit d61d8a89 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #11269 TIME 0:20 TU indexing model

parent c3ca8bde
No related branches found
No related tags found
No related merge requests found
...@@ -26,13 +26,11 @@ class IndexingModelControllerTest extends TestCase ...@@ -26,13 +26,11 @@ class IndexingModelControllerTest extends TestCase
'private' => true, 'private' => true,
'fields' => [ 'fields' => [
[ [
'type' => 'string',
'identifier' => 'subject', 'identifier' => 'subject',
'mandatory' => true, 'mandatory' => true,
'default_value' => 'tika', 'default_value' => 'tika',
], ],
[ [
'type' => 'string',
'identifier' => 'name', 'identifier' => 'name',
'mandatory' => true, 'mandatory' => true,
'default_value' => 'massala', 'default_value' => 'massala',
...@@ -60,11 +58,9 @@ class IndexingModelControllerTest extends TestCase ...@@ -60,11 +58,9 @@ class IndexingModelControllerTest extends TestCase
$this->assertSame('mon model d indexation', $responseBody->indexingModel->label); $this->assertSame('mon model d indexation', $responseBody->indexingModel->label);
$this->assertSame(false, $responseBody->indexingModel->default); $this->assertSame(false, $responseBody->indexingModel->default);
$this->assertSame(true, $responseBody->indexingModel->private); $this->assertSame(true, $responseBody->indexingModel->private);
$this->assertSame('string', $responseBody->indexingModel->fields[0]->type);
$this->assertSame('subject', $responseBody->indexingModel->fields[0]->identifier); $this->assertSame('subject', $responseBody->indexingModel->fields[0]->identifier);
$this->assertSame(true, $responseBody->indexingModel->fields[0]->mandatory); $this->assertSame(true, $responseBody->indexingModel->fields[0]->mandatory);
$this->assertSame('tika', $responseBody->indexingModel->fields[0]->default_value); $this->assertSame('tika', $responseBody->indexingModel->fields[0]->default_value);
$this->assertSame('string', $responseBody->indexingModel->fields[1]->type);
$this->assertSame('name', $responseBody->indexingModel->fields[1]->identifier); $this->assertSame('name', $responseBody->indexingModel->fields[1]->identifier);
$this->assertSame(true, $responseBody->indexingModel->fields[1]->mandatory); $this->assertSame(true, $responseBody->indexingModel->fields[1]->mandatory);
$this->assertSame('massala', $responseBody->indexingModel->fields[1]->default_value); $this->assertSame('massala', $responseBody->indexingModel->fields[1]->default_value);
...@@ -97,13 +93,11 @@ class IndexingModelControllerTest extends TestCase ...@@ -97,13 +93,11 @@ class IndexingModelControllerTest extends TestCase
'default' => false, 'default' => false,
'fields' => [ 'fields' => [
[ [
'type' => 'string',
'identifier' => 'subject', 'identifier' => 'subject',
'mandatory' => true, 'mandatory' => true,
'default_value' => 'butter', 'default_value' => 'butter',
], ],
[ [
'type' => 'string',
'identifier' => 'siret', 'identifier' => 'siret',
'mandatory' => false, 'mandatory' => false,
'default_value' => 'chicken', 'default_value' => 'chicken',
...@@ -128,11 +122,9 @@ class IndexingModelControllerTest extends TestCase ...@@ -128,11 +122,9 @@ class IndexingModelControllerTest extends TestCase
$this->assertSame('mon model d indexation modifié', $responseBody->indexingModel->label); $this->assertSame('mon model d indexation modifié', $responseBody->indexingModel->label);
$this->assertSame(false, $responseBody->indexingModel->default); $this->assertSame(false, $responseBody->indexingModel->default);
$this->assertSame(true, $responseBody->indexingModel->private); $this->assertSame(true, $responseBody->indexingModel->private);
$this->assertSame('string', $responseBody->indexingModel->fields[0]->type);
$this->assertSame('subject', $responseBody->indexingModel->fields[0]->identifier); $this->assertSame('subject', $responseBody->indexingModel->fields[0]->identifier);
$this->assertSame(true, $responseBody->indexingModel->fields[0]->mandatory); $this->assertSame(true, $responseBody->indexingModel->fields[0]->mandatory);
$this->assertSame('butter', $responseBody->indexingModel->fields[0]->default_value); $this->assertSame('butter', $responseBody->indexingModel->fields[0]->default_value);
$this->assertSame('string', $responseBody->indexingModel->fields[1]->type);
$this->assertSame('siret', $responseBody->indexingModel->fields[1]->identifier); $this->assertSame('siret', $responseBody->indexingModel->fields[1]->identifier);
$this->assertSame(false, $responseBody->indexingModel->fields[1]->mandatory); $this->assertSame(false, $responseBody->indexingModel->fields[1]->mandatory);
$this->assertSame('chicken', $responseBody->indexingModel->fields[1]->default_value); $this->assertSame('chicken', $responseBody->indexingModel->fields[1]->default_value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment