Skip to content

Commit

Permalink
[api] some measures to increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Dec 14, 2012
1 parent 5f4f099 commit 8340ad7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 0 additions & 3 deletions src/api/app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
def http_user
return @http_user
end
end
4 changes: 0 additions & 4 deletions src/api/app/helpers/status_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,6 @@ def self.filter_by_package_name(name)
return true
end

def self.memory_usage
number_to_human_size(`ps -o rss= -p #{Process.pid}`.to_i * 1024)
end

def self.calc_status(dbproj, backend)
mypackages = Hash.new

Expand Down
9 changes: 9 additions & 0 deletions src/api/test/functional/status_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,13 @@ def test_bsrequest
assert_response :success
end

def test_history
get "/status/history"
assert_response 400

get "/status/history?hours=24&key=idle_i586"
assert_response :success
# there is no history in fixtures so the result doesn't matter
end
end

0 comments on commit 8340ad7

Please sign in to comment.