Add missing fixture to clean gpg_key table (#2494)
* Add missing fixture to clean gpg_key table * Fix possible too fast request execution in timetracker start/stop test
This commit is contained in:
parent
9bdbfbf6f3
commit
8c3a2e817b
2 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
"path"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
@ -56,6 +57,9 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
|
||||||
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .stop", true)
|
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .stop", true)
|
||||||
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .cancel", true)
|
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .cancel", true)
|
||||||
|
|
||||||
|
// Sleep for 1 second to not get wrong order for stopping timer
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
|
||||||
req = NewRequestWithValues(t, "POST", path.Join(user, repo, "issues", issue, "times", "stopwatch", "toggle"), map[string]string{
|
req = NewRequestWithValues(t, "POST", path.Join(user, repo, "issues", issue, "times", "stopwatch", "toggle"), map[string]string{
|
||||||
"_csrf": htmlDoc.GetCSRF(),
|
"_csrf": htmlDoc.GetCSRF(),
|
||||||
})
|
})
|
||||||
|
|
1
models/fixtures/gpg_key.yml
Normal file
1
models/fixtures/gpg_key.yml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[] # empty
|
Reference in a new issue