mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-23 12:11:34 +00:00
185ad6b00d
"Shamelessly" stolen from https://github.com/matrix-org/synapse/pull/15988
14 lines
359 B
Go
14 lines
359 B
Go
package routing
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func Test_dispositionFor(t *testing.T) {
|
|
assert.Equal(t, "attachment", contentDispositionFor(""), "empty content type")
|
|
assert.Equal(t, "attachment", contentDispositionFor("image/svg"), "image/svg")
|
|
assert.Equal(t, "inline", contentDispositionFor("image/jpeg"), "image/jpg")
|
|
}
|