Commit 7a9fc480809ce50fd34456ae22100ffbe2bbb776
1 parent
d9cfb798
Exists in
master
and in
4 other branches
just test fix commit
Showing
5 changed files
with
12 additions
and
13 deletions
Show diff stats
spec/factories.rb
@@ -38,6 +38,7 @@ Factory.add(:merge_request, MergeRequest) do |obj| | @@ -38,6 +38,7 @@ Factory.add(:merge_request, MergeRequest) do |obj| | ||
38 | obj.title = Faker::Lorem.sentence | 38 | obj.title = Faker::Lorem.sentence |
39 | obj.source_branch = "master" | 39 | obj.source_branch = "master" |
40 | obj.target_branch = "master" | 40 | obj.target_branch = "master" |
41 | + obj.closed = false | ||
41 | end | 42 | end |
42 | 43 | ||
43 | Factory.add(:snippet, Snippet) do |obj| | 44 | Factory.add(:snippet, Snippet) do |obj| |
spec/requests/dashboard_issues_spec.rb
1 | require 'spec_helper' | 1 | require 'spec_helper' |
2 | 2 | ||
3 | -describe "User Issues Dashboard", :js => true do | 3 | +describe "User Issues Dashboard" do |
4 | describe "GET /issues" do | 4 | describe "GET /issues" do |
5 | before do | 5 | before do |
6 | 6 | ||
@@ -27,8 +27,7 @@ describe "User Issues Dashboard", :js => true do | @@ -27,8 +27,7 @@ describe "User Issues Dashboard", :js => true do | ||
27 | :assignee => @user, | 27 | :assignee => @user, |
28 | :project => @project2 | 28 | :project => @project2 |
29 | 29 | ||
30 | - visit dashboard_path | ||
31 | - click_link "issues_slide" | 30 | + visit dashboard_issues_path |
32 | end | 31 | end |
33 | 32 | ||
34 | subject { page } | 33 | subject { page } |
spec/requests/dashboard_merge_requests_spec.rb
1 | require 'spec_helper' | 1 | require 'spec_helper' |
2 | 2 | ||
3 | -describe "User MergeRequests", :js => true do | 3 | +describe "User MergeRequests" do |
4 | describe "GET /issues" do | 4 | describe "GET /issues" do |
5 | before do | 5 | before do |
6 | 6 | ||
@@ -27,19 +27,18 @@ describe "User MergeRequests", :js => true do | @@ -27,19 +27,18 @@ describe "User MergeRequests", :js => true do | ||
27 | :assignee => @user, | 27 | :assignee => @user, |
28 | :project => @project2 | 28 | :project => @project2 |
29 | 29 | ||
30 | - visit dashboard_path | ||
31 | - click_link "merge_requests_slide" | 30 | + visit dashboard_merge_requests_path |
32 | end | 31 | end |
33 | 32 | ||
34 | subject { page } | 33 | subject { page } |
35 | 34 | ||
36 | - it { should have_content(@merge_request1.title) } | 35 | + it { should have_content(@merge_request1.title[0..10]) } |
37 | it { should have_content(@merge_request1.project.name) } | 36 | it { should have_content(@merge_request1.project.name) } |
38 | it { should have_content(@merge_request1.target_branch) } | 37 | it { should have_content(@merge_request1.target_branch) } |
39 | it { should have_content(@merge_request1.source_branch) } | 38 | it { should have_content(@merge_request1.source_branch) } |
40 | it { should have_content(@merge_request1.assignee.name) } | 39 | it { should have_content(@merge_request1.assignee.name) } |
41 | 40 | ||
42 | - it { should have_content(@merge_request2.title) } | 41 | + it { should have_content(@merge_request2.title[0..10]) } |
43 | it { should have_content(@merge_request2.project.name) } | 42 | it { should have_content(@merge_request2.project.name) } |
44 | it { should have_content(@merge_request2.target_branch) } | 43 | it { should have_content(@merge_request2.target_branch) } |
45 | it { should have_content(@merge_request2.source_branch) } | 44 | it { should have_content(@merge_request2.source_branch) } |
spec/requests/projects_spec.rb
@@ -46,7 +46,7 @@ describe "Projects" do | @@ -46,7 +46,7 @@ describe "Projects" do | ||
46 | fill_in 'Name', :with => 'NewProject' | 46 | fill_in 'Name', :with => 'NewProject' |
47 | fill_in 'Code', :with => 'NPR' | 47 | fill_in 'Code', :with => 'NPR' |
48 | fill_in 'Path', :with => 'newproject' | 48 | fill_in 'Path', :with => 'newproject' |
49 | - expect { click_button "Create Project" }.to change { Project.count }.by(1) | 49 | + expect { click_button "Save" }.to change { Project.count }.by(1) |
50 | @project = Project.last | 50 | @project = Project.last |
51 | end | 51 | end |
52 | 52 | ||
@@ -135,7 +135,7 @@ describe "Projects" do | @@ -135,7 +135,7 @@ describe "Projects" do | ||
135 | fill_in 'Name', :with => 'Awesome' | 135 | fill_in 'Name', :with => 'Awesome' |
136 | fill_in 'Path', :with => 'legit' | 136 | fill_in 'Path', :with => 'legit' |
137 | fill_in 'Description', :with => 'Awesome project' | 137 | fill_in 'Description', :with => 'Awesome project' |
138 | - click_button "Update Project" | 138 | + click_button "Save" |
139 | @project = @project.reload | 139 | @project = @project.reload |
140 | end | 140 | end |
141 | 141 |
spec/requests/snippets_spec.rb
@@ -28,7 +28,7 @@ describe "Snippets" do | @@ -28,7 +28,7 @@ describe "Snippets" do | ||
28 | # admin access to remove snippet | 28 | # admin access to remove snippet |
29 | @user.users_projects.destroy_all | 29 | @user.users_projects.destroy_all |
30 | project.add_access(@user, :read, :write, :admin) | 30 | project.add_access(@user, :read, :write, :admin) |
31 | - visit project_snippets_path(project) | 31 | + visit edit_project_snippet_path(project, @snippet) |
32 | end | 32 | end |
33 | 33 | ||
34 | it "should remove entry" do | 34 | it "should remove entry" do |
@@ -72,8 +72,8 @@ describe "Snippets" do | @@ -72,8 +72,8 @@ describe "Snippets" do | ||
72 | @snippet = Factory :snippet, | 72 | @snippet = Factory :snippet, |
73 | :author => @user, | 73 | :author => @user, |
74 | :project => project | 74 | :project => project |
75 | - visit project_snippets_path(project) | ||
76 | - click_link "Edit" | 75 | + visit project_snippet_path(project, @snippet) |
76 | + click_link "Edit Snippet" | ||
77 | end | 77 | end |
78 | 78 | ||
79 | it "should open edit page" do | 79 | it "should open edit page" do |