2011-10-09 00:36:38 +03:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Issues" do
|
|
|
|
let(:project) { Factory :project }
|
|
|
|
let!(:commit) { project.repo.commits.first }
|
|
|
|
|
2011-10-26 18:46:25 +05:00
|
|
|
before do
|
2011-10-09 00:36:38 +03:00
|
|
|
login_as :user
|
|
|
|
project.add_access(@user, :read, :write)
|
|
|
|
end
|
|
|
|
|
2011-10-26 18:46:25 +05:00
|
|
|
describe "add new note", :js => true do
|
|
|
|
before do
|
2011-10-09 00:36:38 +03:00
|
|
|
visit project_commit_path(project, commit)
|
|
|
|
fill_in "note_note", :with => "I commented this commit"
|
2012-03-25 19:44:29 +03:00
|
|
|
click_button "Add Comment"
|
2011-10-09 00:36:38 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
it "should conatin new note" do
|
|
|
|
page.should have_content("I commented this commit")
|
|
|
|
end
|
2012-01-21 14:54:32 +02:00
|
|
|
|
|
|
|
it "should be displayed when i visit this commit again" do
|
|
|
|
visit project_commit_path(project, commit)
|
|
|
|
page.should have_content("I commented this commit")
|
|
|
|
end
|
2011-10-09 00:36:38 +03:00
|
|
|
end
|
|
|
|
end
|