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
4a3cdd0e
Unverified
Commit
4a3cdd0e
authored
10 months ago
by
Chris Truter
Committed by
GitHub
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Test that delete CSV argument is passed through (#41562)
parent
8e3ac99a
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enterprise/backend/test/metabase_enterprise/upload_management/api_test.clj
+11
-1
11 additions, 1 deletion
...d/test/metabase_enterprise/upload_management/api_test.clj
with
11 additions
and
1 deletion
enterprise/backend/test/metabase_enterprise/upload_management/api_test.clj
+
11
−
1
View file @
4a3cdd0e
...
...
@@ -5,6 +5,7 @@
[
java-time.api
:as
t
]
[
metabase.api.table-test
:as
oss-test
]
[
metabase.test
:as
mt
]
[
metabase.upload
:as
upload
]
[
toucan2.tools.with-temp
:as
t2.with-temp
]))
(
def
list-url
"ee/upload-management/tables/"
)
...
...
@@ -76,4 +77,13 @@
(
is
(
=
{
:message
"You don't have permissions to do that."
}
(
mt/user-http-request
:rasta
:delete
403
(
delete-url
table-id
)))))
(
testing
"The table remains in the list"
(
is
(
contains?
(
listed-table-ids
)
table-id
))))))))))
(
is
(
contains?
(
listed-table-ids
)
table-id
)))))
(
testing
"The archive_cards argument is passed through"
(
let
[
passed-value
(
atom
nil
)]
(
mt/with-dynamic-redefs
[
upload/delete-upload!
(
fn
[
_
&
{
:keys
[
archive-cards?
]}]
(
reset!
passed-value
archive-cards?
)
:done
)]
(
let
[
table-id
(
:id
(
oss-test/create-csv!
))]
(
is
(
mt/user-http-request
:crowberto
:delete
200
(
delete-url
table-id
)
:archive-cards
true
))
(
is
(
true?
@
passed-value
)))))))))))
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