Skip to content

Commit

Permalink
Test for MediaDescription.WithFingerprint
Browse files Browse the repository at this point in the history
This tests that an attribute is added, and the key
and value of that attribute are as expected.
  • Loading branch information
wdouglass authored and Sean-Der committed Jun 29, 2020
1 parent df1509c commit d656d47
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions media_description_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package sdp

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestWithFingerprint(t *testing.T) {
m := new(MediaDescription)

assert.Equal(t, []Attribute(nil), m.Attributes)

m = m.WithFingerprint("testalgorithm", "testfingerprint")

assert.Equal(t, []Attribute{
{"fingerprint", "testalgorithm testfingerprint"},
},
m.Attributes)
}

0 comments on commit d656d47

Please sign in to comment.