-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathplugins_test.go
More file actions
34 lines (28 loc) · 962 Bytes
/
plugins_test.go
File metadata and controls
34 lines (28 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 Factom Foundation
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE file.
package state_test
import (
"testing"
"github.com/FactomProject/factomd/testHelper"
)
func TestSetAndGetUseTorrent(t *testing.T) {
state := testHelper.CreateAndPopulateTestStateAndStartValidator()
if state.UsingTorrent() {
t.Error("State unexpectedly using torrents without having been set to true")
}
state.SetUseTorrent(true)
if !state.UsingTorrent() {
t.Error("State not using torrents despite having been set to true")
}
}
func TestSetAndGetTorrentUploader(t *testing.T) {
state := testHelper.CreateAndPopulateTestStateAndStartValidator()
if state.TorrentUploader() {
t.Error("State unexpectedly using TorrentUploader without having been set to true")
}
state.SetTorrentUploader(true)
if !state.TorrentUploader() {
t.Error("State not using TorrentUploader despite having been set to true")
}
}