mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
26 lines
445 B
Go
26 lines
445 B
Go
package focus
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestFocusRaise(t *testing.T) {
|
|
// Start the focus service.
|
|
service, err := NewService()
|
|
require.NoError(t, err)
|
|
|
|
// Try to dial it, it should succeed.
|
|
require.True(t, TryRaise())
|
|
|
|
// The service should report a raise call.
|
|
<-service.GetRaiseCh()
|
|
|
|
// Stop the service.
|
|
service.Close()
|
|
|
|
// Try to dial it, it should fail.
|
|
require.False(t, TryRaise())
|
|
}
|