summaryrefslogtreecommitdiff
path: root/features/steps/project/create.rb
blob: b42e5bd362358cc1cc178fbe3f7ca0e2b88b6c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class CreateProject < Spinach::FeatureSteps
  include SharedAuthentication
  include SharedPaths

  And 'fill project form with valid data' do
    fill_in 'project_name', with: 'Empty'
    click_button "Create project"
  end

  Then 'I should see project page' do
    page.should have_content "Empty"
    current_path.should == project_path(Project.last)
  end

  And 'I should see empty project instuctions' do
    page.should have_content "git init"
    page.should have_content "git remote"
    page.should have_content Project.last.url_to_repo
  end

  Then 'I see empty project instuctions' do
    page.should have_content "git init"
    page.should have_content "git remote"
    page.should have_content Project.last.url_to_repo
  end

  And 'I click on HTTP' do
    click_button 'HTTP'
  end

  Then 'Remote url should update to http link' do
    page.should have_content "git remote add origin #{Project.last.http_url_to_repo}"
  end

  And 'If I click on SSH' do
    click_button 'SSH'
  end

  Then 'Remote url should update to ssh link' do
    page.should have_content "git remote add origin #{Project.last.url_to_repo}"
  end
end