File: media_description_test.go

package info (click to toggle)
golang-github-pion-sdp 3.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 304 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

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)
}