Commit 7a9fc480 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

just test fix commit

parent d9cfb798
...@@ -38,6 +38,7 @@ Factory.add(:merge_request, MergeRequest) do |obj| ...@@ -38,6 +38,7 @@ Factory.add(:merge_request, MergeRequest) do |obj|
obj.title = Faker::Lorem.sentence obj.title = Faker::Lorem.sentence
obj.source_branch = "master" obj.source_branch = "master"
obj.target_branch = "master" obj.target_branch = "master"
obj.closed = false
end end
Factory.add(:snippet, Snippet) do |obj| Factory.add(:snippet, Snippet) do |obj|
......
require 'spec_helper' require 'spec_helper'
describe "User Issues Dashboard", :js => true do describe "User Issues Dashboard" do
describe "GET /issues" do describe "GET /issues" do
before do before do
...@@ -27,8 +27,7 @@ describe "User Issues Dashboard", :js => true do ...@@ -27,8 +27,7 @@ describe "User Issues Dashboard", :js => true do
:assignee => @user, :assignee => @user,
:project => @project2 :project => @project2
visit dashboard_path visit dashboard_issues_path
click_link "issues_slide"
end end
subject { page } subject { page }
......
require 'spec_helper' require 'spec_helper'
describe "User MergeRequests", :js => true do describe "User MergeRequests" do
describe "GET /issues" do describe "GET /issues" do
before do before do
...@@ -27,19 +27,18 @@ describe "User MergeRequests", :js => true do ...@@ -27,19 +27,18 @@ describe "User MergeRequests", :js => true do
:assignee => @user, :assignee => @user,
:project => @project2 :project => @project2
visit dashboard_path visit dashboard_merge_requests_path
click_link "merge_requests_slide"
end end
subject { page } 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.project.name) }
it { should have_content(@merge_request1.target_branch) } it { should have_content(@merge_request1.target_branch) }
it { should have_content(@merge_request1.source_branch) } it { should have_content(@merge_request1.source_branch) }
it { should have_content(@merge_request1.assignee.name) } 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.project.name) }
it { should have_content(@merge_request2.target_branch) } it { should have_content(@merge_request2.target_branch) }
it { should have_content(@merge_request2.source_branch) } it { should have_content(@merge_request2.source_branch) }
......
...@@ -46,7 +46,7 @@ describe "Projects" do ...@@ -46,7 +46,7 @@ describe "Projects" do
fill_in 'Name', :with => 'NewProject' fill_in 'Name', :with => 'NewProject'
fill_in 'Code', :with => 'NPR' fill_in 'Code', :with => 'NPR'
fill_in 'Path', :with => 'newproject' 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 @project = Project.last
end end
...@@ -135,7 +135,7 @@ describe "Projects" do ...@@ -135,7 +135,7 @@ describe "Projects" do
fill_in 'Name', :with => 'Awesome' fill_in 'Name', :with => 'Awesome'
fill_in 'Path', :with => 'legit' fill_in 'Path', :with => 'legit'
fill_in 'Description', :with => 'Awesome project' fill_in 'Description', :with => 'Awesome project'
click_button "Update Project" click_button "Save"
@project = @project.reload @project = @project.reload
end end
......
...@@ -28,7 +28,7 @@ describe "Snippets" do ...@@ -28,7 +28,7 @@ describe "Snippets" do
# admin access to remove snippet # admin access to remove snippet
@user.users_projects.destroy_all @user.users_projects.destroy_all
project.add_access(@user, :read, :write, :admin) project.add_access(@user, :read, :write, :admin)
visit project_snippets_path(project) visit edit_project_snippet_path(project, @snippet)
end end
it "should remove entry" do it "should remove entry" do
...@@ -72,8 +72,8 @@ describe "Snippets" do ...@@ -72,8 +72,8 @@ describe "Snippets" do
@snippet = Factory :snippet, @snippet = Factory :snippet,
:author => @user, :author => @user,
:project => project :project => project
visit project_snippets_path(project) visit project_snippet_path(project, @snippet)
click_link "Edit" click_link "Edit Snippet"
end end
it "should open edit page" do it "should open edit page" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment