1// Copyright (c) 2015 Ableton AG, Berlin. All rights reserved. 2// 3// Use of this source code is governed by a BSD-style 4// license that can be found in the LICENSE file. 5 6// +build integration 7 8package travis 9 10import ( 11 "context" 12 "net/http" 13 "testing" 14) 15 16func TestLintService_Integration_Lint(t *testing.T) { 17 warnings, res, err := integrationClient.Lint.Lint(context.TODO(), &TravisYml{Content: "foo: bar"}) 18 19 if err != nil { 20 t.Fatalf("unexpected error occured: %s", err) 21 } 22 23 if res.StatusCode != http.StatusOK { 24 t.Fatalf("invalid http status: %s", res.Status) 25 } 26 27 if len(warnings) == 0 { 28 t.Fatal("Lint.Lint returned empty warning") 29 } 30} 31