Skip to content

Commit

Permalink
[api] fix test cases (missing fixtures)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Jan 3, 2012
1 parent f62ac06 commit dc1d385
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/api/test/fixtures/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
complete:
id: 1
issue_tracker_id: 1
name: "123456"
owner_id: 1
description: "OBS is not bugfree!"
long_name: "bnc#123456"
state: "RESOLVED"

new:
id: 2
issue_tracker_id: 1
name: "1234"

18 changes: 17 additions & 1 deletion src/api/test/functional/issue_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@

class IssueControllerTest < ActionController::IntegrationTest
def test_get_issues
# get full issue
ActionController::IntegrationTest::reset_auth
# bugs are public atm. Secret stuff should not get imported.
get '/issue_trackers'
assert_response :success
get '/issue_trackers/bnc'
assert_response :success
get '/issue_trackers/bnc/issues/123456'
assert_response :success

# as user
prepare_request_with_user "Iggy", "asdfasdf"
get '/issue_trackers'
assert_response :success
get '/issue_trackers/bnc'
assert_response :success
# get '/issue_trackers/bnc/issues'
# assert_response :success
get '/issue_trackers/bnc/issues/123456'
assert_response :success
assert_tag :tag => 'name', :content => "123456"
Expand Down

0 comments on commit dc1d385

Please sign in to comment.