diff --git a/features/path.feature b/features/path.feature index d490384..e7abf9b 100644 --- a/features/path.feature +++ b/features/path.feature @@ -5,3 +5,8 @@ Feature: Adding an unique path When I add the path to the database Then the path should be added successfully + Scenario: Adding an new path with not uniq path + Given a path "/media" + When I add the path to the database + Then the exception should occur + diff --git a/features/steps/path_steps.py b/features/steps/path_steps.py index 891a691..b5efef6 100644 --- a/features/steps/path_steps.py +++ b/features/steps/path_steps.py @@ -22,3 +22,7 @@ def path_has_added(context): assert context.path.path == context.path_str assert context.exception_raised == False +@then('the exception should occur') +def path_has_not_added(context): + assert context.exception_raised == True +