Skip to content
Snippets Groups Projects
Select Git revision
  • 793a504652281c75a1f3dbaba99bdd2c3246fc3e
  • main default protected
  • drip-server-timing
  • compress-middleware
  • v2.11.0
  • v2.10.0
  • v2.9.2
  • v2.9.1
  • v2.9.0
  • v2.8.0
  • v2.7.0
  • v2.6.0
  • v2.5.6
  • v2.5.5
  • v2.5.4
  • v2.5.3
  • v2.5.2
  • v2.5.1
  • v2.5.0
  • v2.4.2
  • v2.4.1
  • v2.4.0
  • v2.3.0
  • v2.2.2
24 results

handlers_test.go

Blame
  • copyable_test.go 489 B
    // Copyright 2022 schukai GmbH
    // SPDX-License-Identifier: AGPL-3.0
    
    package configuration
    
    import (
    	"github.com/stretchr/testify/assert"
    	"testing"
    )
    
    func TestCopyable(t *testing.T) {
    	config := struct {
    		Host string
    		Port int
    	}{
    		Host: "localhost",
    		Port: 8080,
    	}
    
    	c := New(config)
    
    	assert.Equal(t, c.Config().Host, "localhost")
    	assert.Equal(t, c.Config().Port, 8080)
    
    	m := map[string]any{
    		"Host": "1.2.3.4",
    	}
    
    	c.Copy(m)
    
    	assert.Equal(t, c.Config().Host, "1.2.3.4")
    
    }