summaryrefslogtreecommitdiff
path: root/features/steps/shared/project.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-09 08:14:05 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-01-09 08:14:05 +0300
commit2f6603e58174e5aff35fbc0ce6a9616dc77b077a (patch)
tree86a4383571f73ad2666cc879ae67c1fb5059cf70 /features/steps/shared/project.rb
parentab344f31b6a9b9456ffed1d30fb77bc6bd0a2381 (diff)
downloadgitlab-ce-2f6603e58174e5aff35fbc0ce6a9616dc77b077a.tar.gz
A bit of spinach tests
Diffstat (limited to 'features/steps/shared/project.rb')
-rw-r--r--features/steps/shared/project.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 12dae15edf9..3150be5ef18 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -13,6 +13,44 @@ module SharedProject
@project.team << [@user, :master]
end
+ And 'project "Shop" has push event' do
+ @project = Project.find_by_name("Shop")
+
+ data = {
+ before: "0000000000000000000000000000000000000000",
+ after: "0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e",
+ ref: "refs/heads/new_design",
+ user_id: @user.id,
+ user_name: @user.name,
+ repository: {
+ name: @project.name,
+ url: "localhost/rubinius",
+ description: "",
+ homepage: "localhost/rubinius",
+ private: true
+ }
+ }
+
+ @event = Event.create(
+ project: @project,
+ action: Event::Pushed,
+ data: data,
+ author_id: @user.id
+ )
+ end
+
+ Then 'I should see project "Shop" activity feed' do
+ project = Project.find_by_name("Shop")
+ page.should have_content "#{@user.name} pushed new branch new_design at #{project.name}"
+ end
+
+ Then 'I should see project settings' do
+ current_path.should == edit_project_path(@project)
+ page.should have_content("Project name is")
+ page.should have_content("Advanced settings:")
+ page.should have_content("Features:")
+ end
+
def current_project
@project ||= Project.first
end