Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
handler_test: make test more reliable
Browse files Browse the repository at this point in the history
Linux gives "text/x-sh", and not "application/x-sh".
  • Loading branch information
Francisco Souza committed Sep 9, 2014
1 parent 5b5b689 commit 3ac04f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"io"
"io/ioutil"
"mime"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -1621,7 +1622,8 @@ func (s *S) TestGetMimeTypeFromExtension(c *gocheck.C) {
path = "my-text-file.sh"
content = new(bytes.Buffer)
content.WriteString("")
c.Assert(getMimeType(path, content.Bytes()), gocheck.Equals, "application/x-sh")
expected := mime.TypeByExtension(".sh")
c.Assert(getMimeType(path, content.Bytes()), gocheck.Equals, expected)
}

func (s *S) TestGetMimeTypeFromContent(c *gocheck.C) {
Expand Down

0 comments on commit 3ac04f8

Please sign in to comment.