diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2011-12-16 01:21:29 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2011-12-16 01:21:29 +0400 |
commit | 7a9fc480809ce50fd34456ae22100ffbe2bbb776 (patch) | |
tree | 9e9df2bc62083443f4eae272e8efe2f3e5a32d6e /spec | |
parent | d9cfb7985e1f68cfbb5e836034b200b1a2d8e4c1 (diff) |
just test fix commit
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories.rb | 1 | ||||
-rw-r--r-- | spec/requests/dashboard_issues_spec.rb | 5 | ||||
-rw-r--r-- | spec/requests/dashboard_merge_requests_spec.rb | 9 | ||||
-rw-r--r-- | spec/requests/projects_spec.rb | 4 | ||||
-rw-r--r-- | spec/requests/snippets_spec.rb | 6 |
5 files changed, 12 insertions, 13 deletions
diff --git a/spec/factories.rb b/spec/factories.rb index 6951ca2c840..4b0b0321f4d 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -38,6 +38,7 @@ Factory.add(:merge_request, MergeRequest) do |obj| obj.title = Faker::Lorem.sentence obj.source_branch = "master" obj.target_branch = "master" + obj.closed = false end Factory.add(:snippet, Snippet) do |obj| diff --git a/spec/requests/dashboard_issues_spec.rb b/spec/requests/dashboard_issues_spec.rb index b9304512457..46c5553e155 100644 --- a/spec/requests/dashboard_issues_spec.rb +++ b/spec/requests/dashboard_issues_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "User Issues Dashboard", :js => true do +describe "User Issues Dashboard" do describe "GET /issues" do before do @@ -27,8 +27,7 @@ describe "User Issues Dashboard", :js => true do :assignee => @user, :project => @project2 - visit dashboard_path - click_link "issues_slide" + visit dashboard_issues_path end subject { page } diff --git a/spec/requests/dashboard_merge_requests_spec.rb b/spec/requests/dashboard_merge_requests_spec.rb index 2706497044b..e591609547e 100644 --- a/spec/requests/dashboard_merge_requests_spec.rb +++ b/spec/requests/dashboard_merge_requests_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe "User MergeRequests", :js => true do +describe "User MergeRequests" do describe "GET /issues" do before do @@ -27,19 +27,18 @@ describe "User MergeRequests", :js => true do :assignee => @user, :project => @project2 - visit dashboard_path - click_link "merge_requests_slide" + visit dashboard_merge_requests_path end subject { page } - it { should have_content(@merge_request1.title) } + it { should have_content(@merge_request1.title[0..10]) } it { should have_content(@merge_request1.project.name) } it { should have_content(@merge_request1.target_branch) } it { should have_content(@merge_request1.source_branch) } it { should have_content(@merge_request1.assignee.name) } - it { should have_content(@merge_request2.title) } + it { should have_content(@merge_request2.title[0..10]) } it { should have_content(@merge_request2.project.name) } it { should have_content(@merge_request2.target_branch) } it { should have_content(@merge_request2.source_branch) } diff --git a/spec/requests/projects_spec.rb b/spec/requests/projects_spec.rb index 4800e8b8098..b0a52dcb3c1 100644 --- a/spec/requests/projects_spec.rb +++ b/spec/requests/projects_spec.rb @@ -46,7 +46,7 @@ describe "Projects" do fill_in 'Name', :with => 'NewProject' fill_in 'Code', :with => 'NPR' fill_in 'Path', :with => 'newproject' - expect { click_button "Create Project" }.to change { Project.count }.by(1) + expect { click_button "Save" }.to change { Project.count }.by(1) @project = Project.last end @@ -135,7 +135,7 @@ describe "Projects" do fill_in 'Name', :with => 'Awesome' fill_in 'Path', :with => 'legit' fill_in 'Description', :with => 'Awesome project' - click_button "Update Project" + click_button "Save" @project = @project.reload end diff --git a/spec/requests/snippets_spec.rb b/spec/requests/snippets_spec.rb index d4811958db3..22b558b9cf7 100644 --- a/spec/requests/snippets_spec.rb +++ b/spec/requests/snippets_spec.rb @@ -28,7 +28,7 @@ describe "Snippets" do # admin access to remove snippet @user.users_projects.destroy_all project.add_access(@user, :read, :write, :admin) - visit project_snippets_path(project) + visit edit_project_snippet_path(project, @snippet) end it "should remove entry" do @@ -72,8 +72,8 @@ describe "Snippets" do @snippet = Factory :snippet, :author => @user, :project => project - visit project_snippets_path(project) - click_link "Edit" + visit project_snippet_path(project, @snippet) + click_link "Edit Snippet" end it "should open edit page" do |