Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/projects_wall_spec.rb')
-rw-r--r--spec/requests/projects_wall_spec.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/requests/projects_wall_spec.rb b/spec/requests/projects_wall_spec.rb
new file mode 100644
index 00000000000..a7387f9326d
--- /dev/null
+++ b/spec/requests/projects_wall_spec.rb
@@ -0,0 +1,33 @@
+require 'spec_helper'
+
+describe "Projects", "Wall" do
+ let(:project) { Factory :project }
+
+ before do
+ login_as :user
+ project.add_access(@user, :read, :write)
+ end
+
+ describe "View notes on wall" do
+ before do
+ Factory :note, :project => project, :note => "Project specs", :author => @user
+ visit wall_project_path(project)
+ end
+
+ it { page.should have_content("Project specs") }
+ it { page.should have_content(@user.name) }
+ it { page.should have_content("less than a minute ago") }
+ end
+
+ describe "add new note", :js => true do
+ before do
+ visit wall_project_path(project)
+ fill_in "note_note", :with => "my post on wall"
+ click_button "Add note"
+ end
+
+ it "should conatin new note" do
+ page.should have_content("my post on wall")
+ end
+ end
+end