Skip to content
Snippets Groups Projects
Select Git revision
  • fbefdfc50ca5698cfcd47d56ac5b49630d037696
  • master default protected
  • 0.5.9
  • 0.5.8
  • 0.5.7
  • 0.5.6
  • 0.5.5
  • 0.5.4
  • 0.5.3
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.17
  • 0.4.16
  • 0.4.15
  • 0.4.14
  • 0.4.13
  • 0.4.12
  • 0.4.11
  • 0.4.10
  • 0.4.9
  • 0.4.8
22 results

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