fix: Avoid unnecessary NotebookTab updates (#5068)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
nerix
2024-01-06 12:04:04 +01:00
committed by GitHub
parent 99b537ffd9
commit 1192393039
3 changed files with 16 additions and 8 deletions
+1 -2
View File
@@ -91,8 +91,7 @@ TEST_F(NotebookTabFixture, UpgradeHighlightState)
/// The highlight state must stay as NewMessage when called twice
TEST_F(NotebookTabFixture, SameHighlightStateNewMessage)
{
// XXX: This only updates the state once, so it should only update once
EXPECT_CALL(this->tab, update).Times(Exactly(2));
EXPECT_CALL(this->tab, update).Times(Exactly(1));
EXPECT_EQ(this->tab.highlightState(), HighlightState::None);
this->tab.setHighlightState(HighlightState::NewMessage);
EXPECT_EQ(this->tab.highlightState(), HighlightState::NewMessage);