Skip to content
This repository has been archived by the owner on Dec 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #107 from phrase/move_fixtures_to_testdata
Browse files Browse the repository at this point in the history
move fixtures to testdata
  • Loading branch information
nightlyone committed Nov 9, 2017
2 parents 4da8326 + 3f3a4fd commit e5c04ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions push_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func getBaseSource() *Source {
source := &Source{
File: "./tests/<locale_code>.yml",
File: "./testdata/<locale_code>.yml",
ProjectID: "project-id",
AccessToken: "access-token",
FileFormat: "yml",
Expand Down Expand Up @@ -57,8 +57,8 @@ func TestPushPreconditions(t *testing.T) {
func TestSourceFields(t *testing.T) {
source := getBaseSource()

if source.File != "./tests/<locale_code>.yml" {
t.Errorf("Expected File to be %s and not %s", "./tests/<locale_code>.yml", source.File)
if source.File != "./testdata/<locale_code>.yml" {
t.Errorf("Expected File to be %s and not %s", "./testdata/<locale_code>.yml", source.File)
}

if source.AccessToken != "access-token" {
Expand All @@ -83,7 +83,7 @@ func TestSourceLocaleFilesOne(t *testing.T) {
t.Errorf("Should not fail with: %s", err.Error())
}

absPath, _ := filepath.Abs("./tests/en.yml")
absPath, _ := filepath.Abs("./testdata/en.yml")
expectedFiles := []*LocaleFile{
&LocaleFile{
Name: "english",
Expand All @@ -104,14 +104,14 @@ func TestSourceLocaleFilesOne(t *testing.T) {

func TestSourceLocaleFilesTwo(t *testing.T) {
source := getBaseSource()
source.File = "./tests/<locale_name>.yml"
source.File = "./testdata/<locale_name>.yml"
localeFiles, err := source.LocaleFiles()

if err != nil {
t.Errorf("Should not fail with: %s", err.Error())
}

absPath, _ := filepath.Abs("./tests/en.yml")
absPath, _ := filepath.Abs("./testdata/en.yml")
expectedFiles := []*LocaleFile{
&LocaleFile{
Name: "en",
Expand Down
File renamed without changes.

0 comments on commit e5c04ce

Please sign in to comment.