Commit Graph

696 Commits

Author SHA1 Message Date
evazion
f971f927fd post_test.rb: add tag name validation tests. 2017-02-08 23:31:30 -06:00
r888888888
c01f48f18c mock pool archive service in post test 2017-02-07 14:14:36 -08:00
Albert Yi
b1c33f2379 Merge pull request #2878 from evazion/fix-test-coverage
Improve controller test coverage
2017-02-07 13:45:16 -08:00
r888888888
7a3d1c7d1d dont download original artstation images if they dont exist 2017-02-07 13:40:19 -08:00
r888888888
39b6601afe Merge branch 'artstation' 2017-02-06 17:07:57 -08:00
r888888888
7a2f652152 add source strategy for artstation 2017-02-06 17:07:09 -08:00
evazion
35b3398142 post_test.rb: add more metatag search tests. 2017-02-06 18:48:39 -06:00
evazion
cac5eae3c4 tests: add more tags controller/model tests. 2017-02-06 18:48:39 -06:00
evazion
2b4c722bd1 tests: add more notes controller tests. 2017-02-06 18:48:38 -06:00
evazion
0890c6320b tests: add more comments controller tests. 2017-02-06 18:48:38 -06:00
evazion
73e274b2e0 tests: add more moderator/post/queues controller tests. 2017-02-06 18:48:38 -06:00
evazion
a120a63d3b tests: add more moderator/post/posts controller tests. 2017-02-06 18:48:38 -06:00
evazion
cdafbc849d tests: add more artist commentary controller tests. 2017-02-06 18:48:38 -06:00
evazion
2d62fff89b tests: add more wiki page versions controller tests. 2017-02-06 18:48:37 -06:00
evazion
43591e0c2d tests: add more wiki pages controller tests. 2017-02-06 18:48:37 -06:00
evazion
5c871aee64 tests: add more pools controller tests. 2017-02-06 18:48:37 -06:00
evazion
dfb8d0106d tests: add more posts controller tests. 2017-02-06 18:48:37 -06:00
evazion
09ffac07ea tests: add more users controller tests. 2017-02-06 18:48:37 -06:00
evazion
3edd814be5 tests: add iqdb queries controller tests. 2017-02-06 18:48:37 -06:00
evazion
e26fb61ee9 tests: add explore/posts controller tests. 2017-02-06 18:48:36 -06:00
evazion
443c41cff2 tests: add meta searches controller tests. 2017-02-06 18:48:36 -06:00
evazion
30c3a52187 tests: add mod actions controller test. 2017-02-06 18:48:36 -06:00
evazion
101a03e797 tests: add related tags controller tests. 2017-02-06 18:48:36 -06:00
evazion
423dfc13b8 tests: add sources controller tests. 2017-02-06 18:48:36 -06:00
evazion
142dc05d0c tests: add note previews controller tests. 2017-02-06 18:48:35 -06:00
evazion
77b4dfcdfb tests: add artist controller tests. 2017-02-06 18:48:35 -06:00
evazion
490864e24d tests: add saved searches controller tests. 2017-02-06 18:48:35 -06:00
evazion
64b4004bbf tests: add favorite groups controller tests. 2017-02-06 18:48:35 -06:00
evazion
ed451b7199 tests: add reports controller tests. 2017-02-06 18:48:35 -06:00
evazion
d74503ae05 tests: add misc controller tests. 2017-02-06 18:48:35 -06:00
r888888888
5c16e9ce48 add download strategy for artstation 2017-02-06 12:03:00 -08:00
r888888888
6bf050c607 add download strategy for artstation 2017-02-06 11:59:27 -08:00
evazion
8c75f74ca5 tests: update simplecov config. 2017-02-04 22:17:39 -06:00
evazion
e8cf417e9c tests: update gems to latest versions.
Also fix a few things that broke under shoulda-matchers 3.1.1.
2017-02-04 22:17:15 -06:00
evazion
dd5974bf8c test_helper.rb: use MemcacheMock. 2017-02-04 17:18:52 -06:00
evazion
9b16c45edc test_helper.rb: factor out upload test helpers. 2017-02-04 17:18:52 -06:00
evazion
1511118bba test_helper.rb: remove unused assert_authentication_* helpers. 2017-02-04 17:18:51 -06:00
evazion
beddc34958 tests: set Delayed::Worker.delay_jobs = false globally. 2017-02-04 17:18:51 -06:00
evazion
cd3b09b10a tag_alias_correction_test.rb: fix assert_nil deprecation warning.
Use assert_nil if expecting nil from /home/danbooru/src/danbooru/test/unit/tag_alias_correction_test.rb:29
in `block (3 levels) in <class:TagAliasCorrectionTest>'. This will fail in MT6.
2017-02-04 17:06:59 -06:00
evazion
9429f54632 alias_and_implication_importer_test.rb: fix test failures.
1) Error:
AliasAndImplicationImporterTest#test_: The alias and implication importer given a valid list should process it. :
NoMethodError: undefined method `role' for nil:NilClass
  app/models/tag_alias.rb:124:in `rescue in process!'
  app/models/tag_alias.rb:135:in `process!'
  app/models/tag_alias.rb:93:in `approve!'
  app/logical/alias_and_implication_importer.rb:90:in `block (2 levels) in parse'
  app/logical/alias_and_implication_importer.rb:82:in `map'
  app/logical/alias_and_implication_importer.rb:82:in `block in parse'
  app/logical/alias_and_implication_importer.rb:81:in `parse'
  app/logical/alias_and_implication_importer.rb:13:in `process!'
  test/unit/alias_and_implication_importer_test.rb:24:in `block (4 levels) in <class:AliasAndImplicationImporterTest>'
  test/unit/alias_and_implication_importer_test.rb:23:in `block (3 levels) in <class:AliasAndImplicationImporterTest>'
2017-02-04 17:06:59 -06:00
evazion
a327854017 Fix post_update_count increment test.
7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
  Actual: 3
2017-02-03 04:04:02 -06:00
evazion
27817cffcf Fix saved search test.
16) Failure:
SavedSearchTest#test_: Fetching the post ids for a search with a name should return a list of ids. [/home/danbooru/src/danbooru/test/unit/saved_search_test.rb:31]:
Expected: [1, 2, 3, 4]
  Actual: []
2017-02-03 04:03:44 -06:00
evazion
ace7d0c12d Fix moving saved searches tests.
4) Failure:
TagAliasTest#test_: A tag alias should move saved searches. [/home/danbooru/src/danbooru/test/unit/tag_alias_test.rb:80]:
Expected: "123 bbb 456"
  Actual: "123 ... 456"

 36) Failure:
Moderator::TagBatchChangeTest#test_: a tag batch change should move saved searches. [/home/danbooru/src/danbooru/test/unit/moderator/tag_batch_change_test.rb:40]:
Expected: "123 456 bbb"
  Actual: "123 ... 456"
2017-02-03 04:03:44 -06:00
evazion
72502dbe2f Fix comment voting tests.
2) Error:
CommentTest#test_: A comment created by an unlimited user should not allow duplicate votes. :
ActiveRecord::RecordInvalid: Validation failed: You have already voted for this comment
    app/models/comment.rb:142:in `vote!'
    test/unit/comment_test.rb:164:in `block (3 levels) in <class:CommentTest>'

  3) Error:
CommentTest#test_: A comment created by an unlimited user should not allow upvotes by the creator. :
ActiveRecord::RecordInvalid: Validation failed: You cannot upvote your own comments
    app/models/comment.rb:142:in `vote!'
    test/unit/comment_test.rb:179:in `block (3 levels) in <class:CommentTest>'
2017-02-03 04:03:44 -06:00
evazion
3ee7f0770f Fix posts controller api test.
1) Failure:
    PostsControllerTest#test_: The posts controller for api calls passing the api limit should work. [/home/danbooru/src/danbooru/test/functional/posts_controller_test.rb:34]:
    Expected response to be a <429>, but was <200>.
    Expected: 429
      Actual: 200
2017-02-03 04:03:43 -06:00
r888888888
1207faa600 fix tests 2017-01-24 16:05:06 -08:00
r888888888
f78160827f remove unused config 2017-01-24 13:13:13 -08:00
evazion
601b439f96 Add order:comment_bumped, order:comment_bumped_asc metatags. 2017-01-21 11:10:40 +00:00
evazion
66e30b323c Name changes: remove delete request button. 2017-01-15 05:03:08 +00:00
evazion
cf046eecbf Fix ip addr search tests. 2017-01-12 09:28:52 +00:00