summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorHiroyuki Sato <sathiroyuki@gmail.com>2013-08-21 16:55:18 +0900
committerHiroyuki Sato <sathiroyuki@gmail.com>2013-08-21 17:53:51 +0900
commit5f24bdb7d067df9204e08e126f43c071116089b0 (patch)
tree750250171049a6501692e3f8497b0485eaaac042 /features
parent0a44ecf3a0eb7be66b2dbbb6e8404e3242a4b016 (diff)
downloadgitlab-ce-5f24bdb7d067df9204e08e126f43c071116089b0.tar.gz
Render not found when failing to look for a commit
Diffstat (limited to 'features')
-rw-r--r--features/project/network.feature4
-rw-r--r--features/steps/project/project_network_graph.rb7
-rw-r--r--features/steps/shared/project.rb4
3 files changed, 15 insertions, 0 deletions
diff --git a/features/project/network.feature b/features/project/network.feature
index f98e19b60d3..ceae08c1074 100644
--- a/features/project/network.feature
+++ b/features/project/network.feature
@@ -34,3 +34,7 @@ Feature: Project Network Graph
Then page should not have content not cotaining "v2.1.0"
When click "Show only selected branch" checkbox
Then page should have content not cotaining "v2.1.0"
+
+ Scenario: I should fail to look for a commit
+ When I look for a commit by ";"
+ Then page status code should be 404
diff --git a/features/steps/project/project_network_graph.rb b/features/steps/project/project_network_graph.rb
index c883479ffd3..b3be2a48ecc 100644
--- a/features/steps/project/project_network_graph.rb
+++ b/features/steps/project/project_network_graph.rb
@@ -87,4 +87,11 @@ class ProjectNetworkGraph < Spinach::FeatureSteps
page.should have_content 'v2.1.0'
end
end
+
+ When 'I look for a commit by ";"' do
+ within ".content .search" do
+ fill_in 'q', with: ';'
+ find('button').click
+ end
+ end
end
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index 66553e1e089..c5d8b62bfe7 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -51,6 +51,10 @@ module SharedProject
page.should have_content("Features:")
end
+ Then 'page status code should be 404' do
+ page.status_code.should == 404
+ end
+
def current_project
@project ||= Project.first
end