Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
315199df
Commit
315199df
authored
8 years ago
by
Cam Saül
Browse files
Options
Downloads
Patches
Plain Diff
Remove expect-eval-actual-first from metabase.api.table-test
parent
e2b3fe1c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/metabase/api/table_test.clj
+13
-16
13 additions, 16 deletions
test/metabase/api/table_test.clj
with
13 additions
and
16 deletions
test/metabase/api/table_test.clj
+
13
−
16
View file @
315199df
...
...
@@ -11,9 +11,8 @@
(
metabase.test.data
[
dataset-definitions
:as
defs
]
[
datasets
:as
datasets
]
[
users
:refer
:all
])
[
metabase.test.util
:refer
[
match-$
resolve-private-fns
]]
[
metabase.util
:as
u
]
[
metabase.test.util
:as
tu
]))
[
metabase.test.util
:refer
[
match-$
resolve-private-fns
]
,
:as
tu
]
[
metabase.util
:as
u
]))
(
resolve-private-fns
metabase.models.table
pk-field-id
)
...
...
@@ -438,10 +437,8 @@
;; ## PUT /api/table/:id
(
tu/expect-eval-actual-first
(
match-$
(
u/prog1
(
Table
(
id
:users
))
;; reset Table back to its original state
(
db/update!
Table
(
id
:users
)
,
:display_name
"Users"
,
:entity_type
nil,
:visibility_type
nil,
:description
nil
))
(
tu/expect-with-temp
[
Table
[
table
{
:rows
15
}]]
(
match-$
table
{
:description
"What a nice table!"
:entity_type
"person"
:visibility_type
"hidden"
...
...
@@ -457,10 +454,9 @@
:engine
"h2"
:created_at
$
:features
(
mapv
name
(
driver/features
(
driver/engine->driver
:h2
)))})
:schema
"PUBLIC"
:name
"USERS"
:schema
$
:name
$
:rows
15
:updated_at
$
:entity_name
nil
:display_name
"Userz"
:active
true
...
...
@@ -469,18 +465,19 @@
:db_id
(
id
)
:raw_table_id
$
:created_at
$
})
(
do
((
user->client
:crowberto
)
:put
200
(
format
"table/%d"
(
id
:users
))
{
:display_name
"Userz"
:entity_type
"person"
(
do
((
user->client
:crowberto
)
:put
200
(
format
"table/%d"
(
:
id
table
))
{
:display_name
"Userz"
:entity_type
"person"
:visibility_type
"hidden"
:description
"What a nice table!"
})
((
user->client
:crowberto
)
:get
200
(
format
"table/%d"
(
id
:users
)))))
:description
"What a nice table!"
})
(
dissoc
((
user->client
:crowberto
)
:get
200
(
format
"table/%d"
(
:id
table
)))
:updated_at
)))
;; ## GET /api/table/:id/fks
;; We expect a single FK from CHECKINS.USER_ID -> USERS.ID
(
expect
(
let
[
checkins-user-field
(
Field
:table_id
(
id
:checkins
)
,
:name
"USER_ID"
)
users-id-field
(
Field
:table_id
(
id
:users
)
,
:name
"ID"
)]
(
let
[
checkins-user-field
(
Field
(
id
:checkins
:user_id
)
)
users-id-field
(
Field
(
id
:users
:id
)
)]
[{
:origin_id
(
:id
checkins-user-field
)
:destination_id
(
:id
users-id-field
)
:relationship
"Mt1"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment