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
e15eec71
Commit
e15eec71
authored
9 years ago
by
Allen Gilliland
Browse files
Options
Downloads
Plain Diff
Merge pull request #971 from metabase/fix_unit_test
another attempt to fix activity api unit test.
parents
29786ef7
8d4fe2a3
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/activity_test.clj
+5
-5
5 additions, 5 deletions
test/metabase/api/activity_test.clj
with
5 additions
and
5 deletions
test/metabase/api/activity_test.clj
+
5
−
5
View file @
e15eec71
...
...
@@ -19,9 +19,7 @@
; 2. :user and :model_exists are hydrated
; NOTE: timestamp matching was being a real PITA so I cheated a bit. ideally we'd fix that
(
expect-let
[
client
(
user->client
:crowberto
)
; we do this to create the user-joined activity after first login before we clear out activity for the test
_
(
korma.core/delete
Activity
)
; clear out any existing activity
activity1
(
db/ins
Activity
(
expect-let
[
activity1
(
db/ins
Activity
:topic
"install"
:details
{}
:timestamp
(
u/parse-iso8601
"2015-09-09T12:13:14.888Z"
))
...
...
@@ -98,8 +96,10 @@
:table
nil
:custom_id
nil
:details
$
})]
(
->>
(
client
:get
200
"activity"
)
(
map
#
(
dissoc
%
:timestamp
))))
(
->>
((
user->client
:crowberto
)
:get
200
"activity"
)
(
map
#
(
dissoc
%
:timestamp
))
;; a little hacky, but we limit the possible results to just the test activity we manually generated
(
filter
#
(
contains?
#
{(
:id
activity1
)
(
:id
activity2
)
(
:id
activity3
)}
(
:id
%
)))))
;; GET /recent_views
...
...
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