Commit Graph

5253 Commits

Author SHA1 Message Date
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
Albert Yi
5875565099 Merge pull request #2877 from evazion/fix-tests
Fix remaining test failures
2017-02-06 11:23:35 -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
98b0b2c5d8 tests: fix Net::HTTP::Persistent::Error: too many connection resets.
Works around connection reset errors in the test suite by disabling
persistent connections.

  20) Error:
Sources::PixivTest#test_: in all cases fetching source data for a new manga image should get the tags. :
Net::HTTP::Persistent::Error: too many connection resets (due to closed stream - IOError) after 0 requests on 47071328584700, last used 1.842702476 seconds ago
  app/logical/pixiv_web_agent.rb:46:in `build'
  app/logical/sources/strategies/pixiv.rb:104:in `agent'
  app/logical/sources/strategies/pixiv.rb:72:in `get'
  app/logical/sources/site.rb:6:in `get'
  test/unit/sources/pixiv_test.rb:7:in `get_source'
  test/unit/sources/pixiv_test.rb:64:in `block (3 levels) in <class:PixivTest>'

ref: github.com/sparklemotion/mechanize/issues/123
ref: http://www.rubydoc.info/gems/mechanize/Mechanize#retry_change_requests%3D-instance_method
2017-02-04 17:07:00 -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
r888888888
3965903210 fixes #2875: Encoding::CompatibilityError on /explore/posts/searches 2017-02-03 14:44:13 -08:00
Albert Yi
4357c6e718 Merge pull request #2874 from evazion/fix-tests
Fix various failing tests
2017-02-03 14:28:42 -08:00
Albert Yi
3a06e5486c Merge pull request #2873 from evazion/fix-hotkeys
Disable left/right keys for prev/next page on /posts/:id.
2017-02-03 14:28:03 -08:00
r888888888
497011289f fixes #2865: Undeleting a post doesn't resolve flags 2017-02-03 14:22:21 -08: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
e98e7f1ea7 Fix note_update_count increment test.
5) Failure:
NoteTest#test_: In all cases updating a note should increment the updater's note_update_count. [/home/danbooru/src/danbooru/test/unit/note_test.rb:113]:
"CurrentUser.note_update_count" didn't change by 1.
Expected: 1
  Actual: 0
2017-02-03 04:03:44 -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
evazion
43086634cf hotkeys: fix shift+r => mark forum as read.
Also fix issue with a note handler being rebound instead of unbound.
2017-02-03 03:48:22 -06:00
evazion
d71136ce72 Disable left/right for prev/next page on /posts/:id.
Interferes with horizontal scrolling of wide images.
2017-02-03 03:40:32 -06:00
Albert Yi
7a05af657a Merge pull request #2871 from evazion/feat-filetype-metatag
Add filetype: metatag.
2017-02-02 11:44:33 -08:00
Albert Yi
a54cf09832 Merge pull request #2872 from evazion/fix-2867
Don't send failed uploads to IQDB (possible fix for #2867).
2017-02-02 11:43:58 -08:00
evazion
50b793d129 Don't send failed uploads to IQDB (possible fix for #2867). 2017-02-02 01:26:59 -06:00
evazion
558e4e5443 Add filetype: metatag. 2017-02-02 00:53:56 -06:00
r888888888
cee6a8331a bug fix for janitor trial mailer 2017-02-01 10:49:59 -08:00
Albert Yi
7c0f9f7a58 Merge pull request #2862 from evazion/fix-ruby-2.4
Update gems for ruby-2.4.
2017-01-27 16:01:20 -08:00
Type-kun
8848fa2e2f Fixes #2861 2017-01-27 20:08:43 +05:00
evazion
74cbcb3f80 Update json, rubyracer gems for ruby-2.4.
Fixes a couple incompatibilities with ruby 2.4.

ref: github.com/flori/json/issues/303.
ref: github.com/cowboyd/therubyracer/issues/430
2017-01-27 05:22:05 -06:00
Type-kun
1d25d1315a Fix comment search bugs (secondary ordering, non-bumping typo) 2017-01-27 14:12:16 +05:00
r888888888
8a93fdf18f additional saved search fixes 2017-01-25 12:48:47 -08:00
r888888888
1207faa600 fix tests 2017-01-24 16:05:06 -08:00
r888888888
fe86f40f92 avoid reinstantiating CustomConfiguration 2017-01-24 15:02:53 -08:00
r888888888
2aa7a8aa9c fix for statechecker 2017-01-24 14:32:06 -08:00
r888888888
e12d5e1290 fix cap files 2017-01-24 13:15:21 -08:00
r888888888
f78160827f remove unused config 2017-01-24 13:13:13 -08:00
r888888888
e9d41d6418 include .env to linked files for deployment 2017-01-24 13:13:13 -08:00
r888888888
98b305b4db add link to mod+ topics 2017-01-24 13:13:13 -08:00