issues_notes_spec.rb 586 Bytes
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2 3 4 5
require 'spec_helper'

describe "Issues" do
  let(:project) { Factory :project }

Nihad Abbasov's avatar
Nihad Abbasov committed
6
  before do
gitlabhq's avatar
gitlabhq committed
7 8 9 10 11 12 13 14 15
    login_as :user
    project.add_access(@user, :read, :write)

    @issue = Factory :issue,
      :author => @user,
      :assignee => @user,
      :project => project
  end

Nihad Abbasov's avatar
Nihad Abbasov committed
16 17
  describe "add new note", :js => true do
    before do
gitlabhq's avatar
gitlabhq committed
18 19 20 21 22 23 24 25 26 27
      visit project_issue_path(project, @issue)
      fill_in "note_note", :with => "I commented this issue"
      click_button "Add note"
    end

    it "should conatin new note" do
      page.should have_content("I commented this issue")
    end
  end
end