Adds the ability to set the default view in which to display metrics

This commit is contained in:
James Brooks
2015-12-26 16:43:22 +00:00
parent 0d406b8360
commit 1c27cf7360
16 changed files with 152 additions and 28 deletions
+3 -1
View File
@@ -61,6 +61,7 @@ class MetricTest extends AbstractApiTestCase
'default_value' => 1,
'display_chart' => 1,
'places' => 0,
'view' => 0,
]);
$this->seeJson(['name' => 'Foo']);
$this->assertResponseOk();
@@ -82,8 +83,9 @@ class MetricTest extends AbstractApiTestCase
$this->put('/api/v1/metrics/1', [
'name' => 'Foo',
'view' => 2,
]);
$this->seeJson(['name' => 'Foo']);
$this->seeJson(['name' => 'Foo', 'default_view' => 2]);
$this->assertResponseOk();
}