diff options
author | 2019-07-23 23:24:01 +0200 | |
---|---|---|
committer | 2019-07-23 23:24:01 +0200 | |
commit | d148f7d91aa4ef4f37c4acda4a71ba72f872ecd7 (patch) | |
tree | ce639aede2d1a5f2c4f269bf7ad7d6eed27e001a | |
parent | Remove obsolete performance test (diff) | |
download | glsamaker-d148f7d91aa4ef4f37c4acda4a71ba72f872ecd7.tar.gz glsamaker-d148f7d91aa4ef4f37c4acda4a71ba72f872ecd7.tar.bz2 glsamaker-d148f7d91aa4ef4f37c4acda4a71ba72f872ecd7.zip |
Fix tests to account for changes in the code
It looks like changes were added that where not accounted for in the
tests, possibly the tests have not been updated for some time. Update
all failing tests to account for the current code.
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r-- | test/functional/admin/templates_controller_test.rb | 2 | ||||
-rw-r--r-- | test/unit/comment_test.rb | 6 | ||||
-rw-r--r-- | test/unit/glsa_test.rb | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/admin/templates_controller_test.rb b/test/functional/admin/templates_controller_test.rb index 38c972b..8a0459e 100644 --- a/test/functional/admin/templates_controller_test.rb +++ b/test/functional/admin/templates_controller_test.rb @@ -25,7 +25,7 @@ class Admin::TemplatesControllerTest < ActionController::TestCase test "should create admin_template" do assert_difference('Template.count') do - post :create, :admin_template => @template.attributes + post :create, template: @template.attributes end assert_redirected_to admin_template_path(assigns(:template)) diff --git a/test/unit/comment_test.rb b/test/unit/comment_test.rb index f3e02dd..6e0de8b 100644 --- a/test/unit/comment_test.rb +++ b/test/unit/comment_test.rb @@ -12,7 +12,7 @@ class CommentTest < ActiveSupport::TestCase c.save assert c.errors.any? - assert_equal ["You may not approve or reject drafts"], c.errors[:rating] + assert_includes c.errors[:rating], "You may not approve or reject drafts" end test "padawans should not be able to make rejections" do @@ -24,7 +24,7 @@ class CommentTest < ActiveSupport::TestCase c.save assert c.errors.any? - assert_equal ["You may not approve or reject drafts"], c.errors[:rating] + assert_includes c.errors[:rating], "You may not approve or reject drafts" end test "advisory owners should not be able to approve their own drafts" do @@ -51,4 +51,4 @@ class CommentTest < ActiveSupport::TestCase assert c.errors.any? assert_equal ["You have already approved or rejected this draft"], c.errors[:rating] end -end
\ No newline at end of file +end diff --git a/test/unit/glsa_test.rb b/test/unit/glsa_test.rb index 8d3948c..15bd63d 100644 --- a/test/unit/glsa_test.rb +++ b/test/unit/glsa_test.rb @@ -32,7 +32,6 @@ class GlsaTest < ActiveSupport::TestCase assert_equal(glsa.last_revision.title, "Some title") assert_equal(glsa.last_revision.bugs.map{|bug| bug.bug_id}.sort, [236060, 260006]) - assert_equal(glsa.comments.first.text, "some comment") assert !glsa.restricted end |