summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-05-28 19:29:52 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-05-28 19:29:52 +1100
commit74253f01348770001969e0463b10ed438b445559 (patch)
treef659d69ede8912a1c3ce39370e0ab046164bc837 /spec
parente5226177ac667c8ad4cc07270bbdef24031eb8a2 (diff)
downloadgitlab-ce-74253f01348770001969e0463b10ed438b445559.tar.gz
Replace 'starred_projects.feature' spinach test with an rspec analog23036-replace-all-spinach-tests-with-rspec-feature-tests
Diffstat (limited to 'spec')
-rw-r--r--spec/features/dashboard/projects_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb
index 01351548a99..fa3435ab719 100644
--- a/spec/features/dashboard/projects_spec.rb
+++ b/spec/features/dashboard/projects_spec.rb
@@ -3,10 +3,11 @@ require 'spec_helper'
RSpec.describe 'Dashboard Projects', feature: true do
let(:user) { create(:user) }
let(:project) { create(:project, name: "awesome stuff") }
+ let(:project2) { create(:project, :public, name: 'Community project') }
before do
project.team << [user, :developer]
- login_as user
+ login_as(user)
end
it 'shows the project the user in a member of in the list' do
@@ -14,6 +15,17 @@ RSpec.describe 'Dashboard Projects', feature: true do
expect(page).to have_content('awesome stuff')
end
+ context 'when on Starred projects tab' do
+ it 'shows only starred projects' do
+ user.toggle_star(project2)
+
+ visit(starred_dashboard_projects_path)
+
+ expect(page).not_to have_content(project.name)
+ expect(page).to have_content(project2.name)
+ end
+ end
+
describe "with a pipeline", redis: true do
let!(:pipeline) { create(:ci_pipeline, project: project, sha: project.commit.sha) }