Skip to content

Commit

Permalink
Add test for #200
Browse files Browse the repository at this point in the history
  • Loading branch information
owenthereal committed Mar 25, 2014
1 parent 4561300 commit bc558e0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion commands/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
package commands

import (
"github.com/bmizerany/assert"
"io/ioutil"
"os"
"testing"

"github.com/bmizerany/assert"
)

func TestGetTitleAndBodyFromFlags(t *testing.T) {
s := "just needs raven\n\nnow it works"
title, body, err := getTitleAndBodyFromFlags(s, "")

assert.Equal(t, nil, err)
assert.Equal(t, "just needs raven", title)
assert.Equal(t, "now it works", body)
}

func TestDirIsNotEmpty(t *testing.T) {
dir := createTempDir(t)
defer os.RemoveAll(dir)
Expand Down

0 comments on commit bc558e0

Please sign in to comment.