Skip to content

Commit

Permalink
Hide avatar in commitinfo for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gerhardol committed May 19, 2022
1 parent f78a3f3 commit b8a34b7
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class FormBrowse_LeftPanel_RemotesTests

// Track the original setting value
private bool _originalShowAuthorAvatarColumn;
private bool _showAuthorAvatarInCommitInfo;
private bool _showAvailableDiffTools;

// Created once for each test
Expand All @@ -37,19 +38,22 @@ public void SetUpFixture()
{
// Remember the current settings...
_originalShowAuthorAvatarColumn = AppSettings.ShowAuthorAvatarColumn;
_showAuthorAvatarInCommitInfo = AppSettings.ShowAuthorAvatarInCommitInfo;
_showAvailableDiffTools = AppSettings.ShowAvailableDiffTools;

// Stop loading custom diff tools
AppSettings.ShowAvailableDiffTools = false;

// We don't want avatars during tests, otherwise we will be attempting to download them from gravatar....
AppSettings.ShowAuthorAvatarColumn = false;
AppSettings.ShowAuthorAvatarInCommitInfo = false;
}

[OneTimeTearDown]
public void OneTimeTearDown()
{
AppSettings.ShowAuthorAvatarColumn = _originalShowAuthorAvatarColumn;
AppSettings.ShowAuthorAvatarInCommitInfo = _showAuthorAvatarInCommitInfo;
AppSettings.ShowAvailableDiffTools = _showAvailableDiffTools;
}

Expand Down

0 comments on commit b8a34b7

Please sign in to comment.