mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 12:58:33 +00:00
Added test
This commit is contained in:
parent
89bc2e9759
commit
f372f3d56c
21
tests/rules/test_git_remote_delete.py
Normal file
21
tests/rules/test_git_remote_delete.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import pytest
|
||||||
|
from thefuck.rules.git_remote_delete import get_new_command, match
|
||||||
|
from thefuck.types import Command
|
||||||
|
|
||||||
|
|
||||||
|
def test_match():
|
||||||
|
assert match(Command('git remote delete foo', ''))
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('command', [
|
||||||
|
Command('git remote remove foo', ''),
|
||||||
|
Command('git remote add foo', ''),
|
||||||
|
Command('git commit', '')
|
||||||
|
])
|
||||||
|
def test_not_match(command):
|
||||||
|
assert not match(command)
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_new_command():
|
||||||
|
new_command = get_new_command(Command('git remote delete foo', ''))
|
||||||
|
assert new_command == 'git remote remove foo'
|
Loading…
x
Reference in New Issue
Block a user