Sha256: 2d17b58b8473e0c1f1b9cf88eea79eda920467df2cc82f1e61e2140dac426f33

Contents?: true

Size: 848 Bytes

Versions: 2

Compression:

Stored size: 848 Bytes

Contents

#!/usr/bin/env bats

@test "command usage" {
    noms2 | grep Usage:
}

@test "command error" {
    run noms2 foo
    [ $status -ne 0 ]
    echo "$output" | grep -q "noms error: noms command \"foo\" not found: not a URL or bookmark"
}

@test "command js error" {
    run noms2 'data:application/json,{"$doctype":"noms-v2","$script":["window.alert(\"test error string\")"],"$body":[]}'
    echo "$output" | grep -q "test error string"
}

@test "command js error (different namespace)" {
    run noms2 'data:application/json,{"$doctype":"noms-v2","$script":["alert(\"test error string\")"],"$body":[]}'
    echo "$output" | grep -q "test error string"
}


@test "scriptable auth" {
    rake start
    chmod 0600 test/identity
    noms2 -i test/identity http://localhost:8787/auth/dnc.json | grep -q Usage:
    ec=$?
    rake stop
    [ $ec -eq 0 ]
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
noms-command-2.1.1 spec/02noms-command.sh
noms-command-0.5.0 spec/02noms-command.sh