Skip to content
Browse files

Add a test for /admin/repos

  • Loading branch information...
1 parent 3623eed commit eedec92a9794681c5823eff9af5e5488d6dda331 @philc philc committed Apr 16, 2012
Showing with 9 additions and 3 deletions.
  1. +8 −2 test/unit/app_test.rb
  2. +1 −1 views/admin/repos.erb
View
10 test/unit/app_test.rb
@@ -158,11 +158,17 @@ def setup_repo(name)
assert_status 200
end
+ should "show a list of repos" do
+ meta_repo = MetaRepo.new(FIXTURES_PATH)
+ stub(MetaRepo).instance { meta_repo }
+ get "/admin/repos"
+ assert_status 200
+ dom_response.css("repoList").text.include?(meta_repo.repos.first.name)
+ end
+
teardown do
any_instance_of(Barkeep, :current_user => @user)
end
end
end
-
- def assert_status(status_code) assert_equal status_code, last_response.status end
end
View
2 views/admin/repos.erb
@@ -46,7 +46,7 @@
<h2>Repos currently monitored</h2>
- <table>
+ <table id="repoList">
<th>Name</th>
<th>URL</th>
<th>Newest fetched commit</th>

0 comments on commit eedec92

Please sign in to comment.
Something went wrong with that request. Please try again.