-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Segment tracking after user creation
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defmodule CodeCorps.Analytics.TestAPI do | ||
@moduledoc """ | ||
In-memory interface to simulate calling out to the Segment API, | ||
sending back itself a message with passed parameters - they're used for assertions. | ||
Each function should have the same signature as `CodeCorps.Analytics.SegmentAPI` and simply return `nil`. | ||
""" | ||
|
||
def identify(user_id, traits) do | ||
send self(), {:identify, user_id, traits} | ||
nil | ||
end | ||
|
||
def track(user_id, event_name, properties) do | ||
send self(), {:track, user_id, event_name, properties} | ||
nil | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters