Skip to content
Snippets Groups Projects
Select Git revision
  • 20953df6d29a0ae63972ca6352a402779a918f0d
  • master default protected
  • 1.31
  • 4.38.6
  • 4.38.5
  • 4.38.4
  • 4.38.3
  • 4.38.2
  • 4.38.1
  • 4.38.0
  • 4.37.2
  • 4.37.1
  • 4.37.0
  • 4.36.0
  • 4.35.0
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
  • 4.32.0
  • 4.31.0
23 results

189.mjs

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