Go-Back-Skeleton/vendor/github.com/vanng822/css/styledeclaration_test.go
2017-09-25 20:20:52 +02:00

16 lines
No EOL
370 B
Go

package css
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestDeclWithImportan(t *testing.T) {
decl := NewCSSStyleDeclaration("width", "100%", 1)
assert.Equal(t, decl.Text(), "width: 100% !important")
}
func TestDeclWithoutImportan(t *testing.T) {
decl := NewCSSStyleDeclaration("width", "100%", 0)
assert.Equal(t, decl.Text(), "width: 100%")
}