Skip to content

Commit

Permalink
[ci] Move project controller test to new rspec test suite, part II
Browse files Browse the repository at this point in the history
old test: test/functional/webui/create_test.rb
  • Loading branch information
bgeuken committed Feb 8, 2016
1 parent 8384dfa commit af0127d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/api/spec/features/webui/projects_spec.rb
Expand Up @@ -18,4 +18,19 @@
fill_in "name", :with => "coolstuff"
click_button "Save changes"
end

scenario "create subproject" do
login user
visit project_show_path(project: user.home_project_name)
click_link("Subprojects")

expect(page).to have_text("This project has no subprojects")
click_link("create_subproject_link")
fill_in "project_name", :with => "coolstuff"
click_button "Create Project"
expect(page).to have_content("Project '#{user.home_project_name}:coolstuff' was created successfully")

expect(page.current_path).to match(project_show_path(project: "#{user.home_project_name}:coolstuff"))
expect(find('#project_title').text).to eq("#{user.home_project_name}:coolstuff")
end
end
2 changes: 1 addition & 1 deletion src/api/test/functional/webui/create_test.rb
Expand Up @@ -14,7 +14,7 @@ def test_create_package # spec/features/webui/projects_spec.rb
click_button 'Save changes'
end

def test_create_subproject
def test_create_subproject # spec/features/webui/projects_spec.rb
login_tom to: project_show_path(project: 'home:tom')
click_link 'Subprojects'

Expand Down

0 comments on commit af0127d

Please sign in to comment.