aboutsummaryrefslogtreecommitdiff
path: root/mediaapi/routing/download_test.go
blob: 21f6bfc2c71a78cf04bb54127b3b65915fca0cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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")
}