1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 22:54:14 +00:00

Merge pull request #701 from Epse/#670-git_remote_delete

fixed #670
This commit is contained in:
Vladimir Iakovlev
2017-10-08 16:25:59 +02:00
committed by GitHub
3 changed files with 37 additions and 0 deletions

View 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'