Skip to content

Commit

Permalink
fix windows test paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vektah committed Feb 3, 2020
1 parent 93713a2 commit c233876
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions codegen/config/package_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"path/filepath"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -19,7 +20,7 @@ func TestPackageConfig(t *testing.T) {
require.Equal(t, "config_test_data", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/example.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/example.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand All @@ -35,7 +36,7 @@ func TestPackageConfig(t *testing.T) {
require.Equal(t, "wololo", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/example.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/example.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand Down
13 changes: 6 additions & 7 deletions codegen/config/resolver_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"path/filepath"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -20,7 +21,7 @@ func TestResolverConfig(t *testing.T) {
require.Equal(t, "config_test_data", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/example.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/example.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand All @@ -36,7 +37,7 @@ func TestResolverConfig(t *testing.T) {
require.Equal(t, "wololo", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/example.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/example.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand Down Expand Up @@ -83,9 +84,7 @@ func TestResolverConfig(t *testing.T) {
require.Equal(t, "config_test_data", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/resolver.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/resolver.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand All @@ -101,7 +100,7 @@ func TestResolverConfig(t *testing.T) {
require.Equal(t, "wololo", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/resolver.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/resolver.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand All @@ -117,7 +116,7 @@ func TestResolverConfig(t *testing.T) {
require.Equal(t, "config_test_data", p.Pkg().Name())
require.Equal(t, "github.com/99designs/gqlgen/codegen/config/testdata", p.Pkg().Path())

require.Contains(t, p.Filename, "codegen/config/testdata/asdf.go")
require.Contains(t, filepath.ToSlash(p.Filename), "codegen/config/testdata/asdf.go")
require.Contains(t, p.Dir(), "codegen/config/testdata")
})

Expand Down

0 comments on commit c233876

Please sign in to comment.