Commit c606df8fdf7ea4601415fb54135f1c53083f9456
1 parent
91e112ff
Exists in
master
and in
4 other branches
Test.
Showing
2 changed files
with
33 additions
and
0 deletions
Show diff stats
features/project/create_project.feature
... | ... | @@ -9,3 +9,14 @@ Feature: Create Project |
9 | 9 | And fill project form with valid data |
10 | 10 | Then I should see project page |
11 | 11 | And I should see empty project instuctions |
12 | + | |
13 | + @javascript | |
14 | + Scenario: Empty project instructions | |
15 | + Given I sign in as a user | |
16 | + When I visit new project page | |
17 | + And fill project form with valid data | |
18 | + Then I see empty project instuctions | |
19 | + And I click on HTTP | |
20 | + Then Remote url should update to http link | |
21 | + And If I click on SSH | |
22 | + Then Remote url should update to ssh link | |
12 | 23 | \ No newline at end of file | ... | ... |
features/steps/project/create_project.rb
... | ... | @@ -17,4 +17,26 @@ class CreateProject < Spinach::FeatureSteps |
17 | 17 | page.should have_content "git remote" |
18 | 18 | page.should have_content Project.last.url_to_repo |
19 | 19 | end |
20 | + | |
21 | + Then 'I see empty project instuctions' do | |
22 | + page.should have_content "git init" | |
23 | + page.should have_content "git remote" | |
24 | + page.should have_content Project.last.url_to_repo | |
25 | + end | |
26 | + | |
27 | + And 'I click on HTTP' do | |
28 | + click_button 'HTTP' | |
29 | + end | |
30 | + | |
31 | + Then 'Remote url should update to http link' do | |
32 | + page.should have_content "git remote add origin #{Project.last.http_url_to_repo}" | |
33 | + end | |
34 | + | |
35 | + And 'If I click on SSH' do | |
36 | + click_button 'SSH' | |
37 | + end | |
38 | + | |
39 | + Then 'Remote url should update to ssh link' do | |
40 | + page.should have_content "git remote add origin #{Project.last.url_to_repo}" | |
41 | + end | |
20 | 42 | end | ... | ... |