Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-06-21 13:45:43 +0300
committerblackst0ne <blackst0ne.ru@gmail.com>2017-06-21 13:45:43 +0300
commit665fea379bbf9f31598d237335bc8d6e54ac8947 (patch)
tree5264965523d2cec5ef89218bbb60feb6b9bc9299 /spec/features/projects/user_creates_project_spec.rb
parent4b0b2f1525be5feac0ae0953eb573ff24cc7b9c5 (diff)
Replace 'create.feature' spinach test with an rspec analog
Diffstat (limited to 'spec/features/projects/user_creates_project_spec.rb')
-rw-r--r--spec/features/projects/user_creates_project_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/projects/user_creates_project_spec.rb b/spec/features/projects/user_creates_project_spec.rb
new file mode 100644
index 00000000000..29f1eb8d73e
--- /dev/null
+++ b/spec/features/projects/user_creates_project_spec.rb
@@ -0,0 +1,27 @@
+require 'spec_helper'
+
+feature 'User creates a project', js: true do
+ let(:user) { create(:user) }
+
+ before do
+ sign_in(user)
+ create(:personal_key, user: user)
+ visit(new_project_path)
+ end
+
+ it 'creates a new project' do
+ fill_in(:project_path, with: 'Empty')
+
+ page.within('#content-body') do
+ click_button('Create project')
+ end
+
+ project = Project.last
+
+ expect(current_path).to eq(namespace_project_path(project.namespace, project))
+ expect(page).to have_content('Empty')
+ expect(page).to have_content('git init')
+ expect(page).to have_content('git remote')
+ expect(page).to have_content(project.url_to_repo)
+ end
+end