-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BSA-3322] Add last_seen_at to users data feed (#170)
Adds `last_seen_at` to the users data feed.
- Loading branch information
Showing
7 changed files
with
32 additions
and
28 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -418,10 +418,10 @@ func TestCSVExporterFinaliseExport_should_write_rows_out_to_file(t *testing.T) { | |
|
||
contentString := dateRegex.ReplaceAllLiteralString(strings.TrimSpace(string(content)), "--date--") | ||
|
||
expected := `user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_1,role_123,[email protected],User 1,User 1,false,--date-- | ||
user_2,role_123,[email protected],User 2,User 2,false,--date-- | ||
user_3,role_123,[email protected],User 3,User 3,false,--date--` | ||
expected := `user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at | ||
user_1,role_123,[email protected],User 1,User 1,false,,--date-- | ||
user_2,role_123,[email protected],User 2,User 2,false,,--date-- | ||
user_3,role_123,[email protected],User 3,User 3,false,,--date--` | ||
assert.Equal(t, strings.TrimSpace(expected), contentString) | ||
} | ||
|
||
|
@@ -475,17 +475,17 @@ func TestCSVExporterFinaliseExport_should_write_rows_to_multiple_file(t *testing | |
|
||
content1String := dateRegex.ReplaceAllLiteralString(strings.TrimSpace(string(content1)), "--date--") | ||
|
||
expected1 := `user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_1,role_123,[email protected],User 1,User 1,false,--date-- | ||
user_2,role_123,[email protected],User 2,User 2,false,--date--` | ||
expected1 := `user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at | ||
user_1,role_123,[email protected],User 1,User 1,false,,--date-- | ||
user_2,role_123,[email protected],User 2,User 2,false,,--date--` | ||
assert.Equal(t, strings.TrimSpace(expected1), content1String) | ||
|
||
content2, err := ioutil.ReadFile(files[1]) | ||
assert.Nil(t, err) | ||
|
||
content2String := dateRegex.ReplaceAllLiteralString(strings.TrimSpace(string(content2)), "--date--") | ||
|
||
expected2 := `user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_3,role_123,[email protected],User 3,User 3,false,--date--` | ||
expected2 := `user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at | ||
user_3,role_123,[email protected],User 3,User 3,false,,--date--` | ||
assert.Equal(t, strings.TrimSpace(expected2), content2String) | ||
} |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_1,role_123,[email protected],Dwight,Schrute,true,--date-- | ||
user_2,role_123,[email protected],Abraham,Lincoln,true,--date-- | ||
user_3,role_123,[email protected],Stefani Joanne Angelina,Germanotta,true,--date-- | ||
user_4,role_123,tests+Agnetha.Fä[email protected],Agnetha,Fältskog,false,--date-- | ||
user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at | ||
user_1,role_123,[email protected],Dwight,Schrute,true,--date--,--date-- | ||
user_2,role_123,[email protected],Abraham,Lincoln,true,,--date-- | ||
user_3,role_123,[email protected],Stefani Joanne Angelina,Germanotta,true,,--date-- | ||
user_4,role_123,tests+Agnetha.Fä[email protected],Agnetha,Fältskog,false,,--date-- |
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 |
---|---|---|
@@ -1 +1 @@ | ||
user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
user_id,organisation_id,email,firstname,lastname,active,exported_at | ||
user_1,role_123,[email protected],Dwight,Schrute,true,--date-- | ||
user_2,role_123,[email protected],Abraham,Lincoln,true,--date-- | ||
user_3,role_123,[email protected],Stefani Joanne Angelina,Germanotta,true,--date-- | ||
user_4,role_123,tests+Agnetha.Fä[email protected],Agnetha,Fältskog,false,--date-- | ||
user_id,organisation_id,email,firstname,lastname,active,last_seen_at,exported_at | ||
user_1,role_123,[email protected],Dwight,Schrute,true,--date--,--date-- | ||
user_2,role_123,[email protected],Abraham,Lincoln,true,,--date-- | ||
user_3,role_123,[email protected],Stefani Joanne Angelina,Germanotta,true,,--date-- | ||
user_4,role_123,tests+Agnetha.Fä[email protected],Agnetha,Fältskog,false,,--date-- |