Commit Graph
85 Commits
Author SHA1 Message Date
ysksnandYamagishi Kazutoshi 782b622f5f Add specs for action log helper (#9605)
* Add specs for ActionLogHelper

* Make some methods private

methods below never referenced from outside of their module:

- #linkable_log_target
- #log_target_from_history
2019-03-16 00:57:23 +09:00
ysksnandEugen Rochko bcfff65195 Create Redisable#redis (#9633)
* Create Redisable

* Use #redis instead of Redis.current
2019-02-02 19:11:38 +01:00
ysksnandEugen Rochko c059999ab3 Add a spec for Admin::ActionLog (#9775) 2019-01-11 07:28:09 +00:00
ysksnandEugen Rochko 09c3c96607 Add specs for Admin::AccountAction (#9767) 2019-01-11 07:26:03 +00:00
ysksnandEugen Rochko 61ecda1575 Not to skip executable specs (#9753)
* Not to skip executable specs

* Combine specs

Combine specs to one to reduce multiple slow http post.
2019-01-10 15:12:31 +01:00
ysksnandEugen Rochko 9a38357111 Remove pending (#9752)
Some specs have already been added.
2019-01-08 09:42:56 +01:00
ysksnandYamagishi Kazutoshi 274109e9f3 Remove spec files (#9751)
Nothing to test.
2019-01-08 12:18:46 +09:00
ysksnandYamagishi Kazutoshi 88deca16ca Add pending specs for jsonld helper (#9750)
* Add specs for JsonLdHelper#first_of_value

* Add specs for JsonLdHelper#supported_context?
2019-01-08 12:18:27 +09:00
ysksnandYamagishi Kazutoshi 5efedb5d5e Add specs for UrlValidator (#9699) 2019-01-03 13:10:20 +09:00
ysksnandYamagishi Kazutoshi 19abf4ef0b Add specs for UnreservedUsernameValidator (#9698)
* Add specs for UnreservedUsernameValidator

* Use instance variable
2019-01-03 13:10:02 +09:00
ysksnandEugen Rochko fb08039de5 Add specs for FollowLimitValidator (#9655) 2018-12-29 08:24:52 +01:00
ysksnandEugen Rochko 05edec6917 Add specs for BlackListedEmailValidator (#9651)
* Add specs for BlackListedEmailValidator

* Use instance variable
2018-12-29 07:23:44 +01:00
ysksnandEugen Rochko 4725aeec9f Add specs for DisallowedHashtagsValidator (#9653)
In order to implement tests easier, `#select_tags` created.
2018-12-29 07:22:51 +01:00
ysksnandYamagishi Kazutoshi d01c840e14 Add specs for StatusPinValidator (#9648) 2018-12-28 18:09:32 +09:00
ysksnandEugen Rochko ccb9c1b952 Add pending specs for StatusLengthValidator (#9647)
* Add pending specs of StatusLengthValidator

* Use instance variable
2018-12-28 08:18:47 +01:00
ysksnandEugen Rochko a8ba291beb Fix scope latest of ReportNote (#9630) 2018-12-26 06:38:59 +01:00
ysksnandEugen Rochko 0c1e4bb969 Create DomainNormalizable#normalize_domain (#9631) 2018-12-26 06:38:42 +01:00
ysksnandEugen Rochko 6641a1cac9 Remove Form::StatusBatch::ACTION_TYPE unused (#9623) 2018-12-25 18:29:51 +01:00
ysksnandEugen Rochko bd4ee732c2 Remove MailerHelper does nothing (#9604) 2018-12-22 02:35:55 +01:00
ysksnandEugen Rochko eee2b05ea2 Add specs for CustomEmojiFilter (#9599) 2018-12-21 18:52:57 +01:00
ysksnandEugen Rochko de3cecf37a Add specs for AdminMailer (#9597) 2018-12-21 09:34:34 +01:00
ysksnandEugen Rochko 1bc78ec50e Add specs for InstancePresenter (#9596) 2018-12-21 08:59:56 +01:00
ysksnandEugen Rochko 6a2d030c2f Add specs for ReportNotePolicy (#9592) 2018-12-20 17:52:18 +01:00
ysksnandEugen Rochko b93e317886 Add specs for policies (#9591)
* Add spec for RelayPolicy

* Add specs for SubscriptionPolicy

* Add specs for SettingsPolicy

* Add specs for TagPolicy

* Add specs for ReportPolicy
2018-12-20 17:52:07 +01:00
ysksnandEugen Rochko be9640bfc2 Add specs for UserPolicy (#9593) 2018-12-20 17:51:55 +01:00
ysksnandEugen Rochko d649d84594 Add specs for InvitePolicy (#9589) 2018-12-20 04:23:09 +01:00
ysksnandEugen Rochko 44189c33d1 Add specs for EmailDomainBlockPolicy (#9586) 2018-12-20 03:51:41 +01:00
ysksnandEugen Rochko 08cb8a1ff3 Add specs for InstancePolicy (#9587) 2018-12-20 03:51:31 +01:00
ysksnandEugen Rochko e181f99739 Add specs for DomainBlockPolicy (#9585) 2018-12-20 03:47:51 +01:00
ysksnandEugen Rochko 5088213f5e Add specs for CustomEmojiPolicy (#9584) 2018-12-20 03:24:28 +01:00
ysksnandEugen Rochko 5d724aa129 Add specs for BackupPolicy (#9576) 2018-12-19 18:24:15 +01:00
ysksnandEugen Rochko af56efdec5 Add specs for AccountPolicy (#9575) 2018-12-19 08:56:59 +01:00
ysksnandEugen Rochko 0a1ade4f02 Add specs for AccountModerationNotePolicy (#9571) 2018-12-19 07:24:03 +01:00
ysksnandEugen Rochko 102e4cfa32 Add specs for StatusPolicy (#9569) 2018-12-19 05:19:20 +01:00
ysksnandEugen Rochko dd85700a3e Add spec for AccountableConcern#log_action (#9559) 2018-12-18 16:43:03 +01:00
ysksnandEugen Rochko 3281df0df1 Move #set_user to Admin::BaseController (#9470)
* Move #set_user to Admin::BaseController

* Rename Admin::TwoFactorAuthenticationsController

from `#set_user` to `#set_target_user` .
2018-12-17 11:40:51 +01:00
ysksnandEugen Rochko 0c80715235 Add spec for Api::V1::Timelines::DirectController (#9547) 2018-12-17 11:36:20 +01:00
ysksnandEugen Rochko 351938520d Add specs for Api::V1::Instances::PeersController (#9546) 2018-12-17 11:35:55 +01:00
ysksnandEugen Rochko 2d871feb10 Add spec for Api::V1::EndorsementsController (#9543) 2018-12-17 11:32:44 +01:00
ysksnandEugen Rochko 3fa9615cb3 Add spec for Api::V1::Instances::ActivityController (#9545) 2018-12-17 11:32:24 +01:00
ysksnandEugen Rochko a3dcbfddd6 Add specs for Accounts::PinsController (#9542) 2018-12-17 06:03:51 +01:00
ysksnandEugen Rochko 3c31c28605 Add spec for Admin::ActionLogsController#index (#9522) 2018-12-14 20:37:01 +01:00
ysksnandEugen Rochko 458e2b0c5b Add specs for RemoteInteractionController (#9524) 2018-12-14 20:36:40 +01:00
ysksnandEugen Rochko c1600a0f69 Add spec for Admin::DashboardController#index (#9523) 2018-12-14 20:36:18 +01:00
ysksnandEugen Rochko 795bac44fd Add spec for Settings::ExportsController#create (#9512) 2018-12-13 02:53:52 +01:00
ysksnandEugen Rochko b048926e67 Create Settings::BaseController (#9507)
Define `Settings::BaseController#set_body_classes` so that sub classes
inherit `Settings::BaseController` don't need to define
`#set_body_classes` agein.
2018-12-12 22:32:13 +01:00
ysksnandEugen Rochko 83975a2394 Remove redundant (#9503) 2018-12-12 05:54:34 +01:00
ysksnandEugen Rochko 351ed12b2f Use find_or_initialize_by (#9504) 2018-12-12 05:54:09 +01:00
ysksnandEugen Rochko ed24bb2c3e Add specs for activitypub collections controller (#9484)
* Add specs for ActivityPub::CollectionsController#show

* Raise ActiveRecord::RecordNotFound

Raising ActiveRecord::NotFound raises NameError: uninitialized constant
ActiveRecord::NotFound.
2018-12-10 21:39:25 +01:00
ysksnandEugen Rochko 6eae8f77af Add spec for Admin::SuspentionsController#new (#9483) 2018-12-10 21:38:21 +01:00
ysksnandEugen Rochko 189a6b17fb Remove RemoteAccountControllerConcern never used (#9482) 2018-12-10 21:38:01 +01:00
ysksnandEugen Rochko 361818e931 Fix Admin::TagsController#unhide (#9481) 2018-12-10 21:37:38 +01:00
ysksnandYamagishi Kazutoshi ae3d2f446a Add specs for Admin::InvitesController (#9471) 2018-12-10 01:19:28 +09:00
ysksnandEugen Rochko dfd123d5b3 Remove pending spec (#9453) 2018-12-07 16:53:55 +01:00
ysksnandEugen Rochko d3547fa005 Add specs for ActivityPub::InboxesController (#9456) 2018-12-07 16:40:01 +01:00
ysksnandEugen Rochko 88b3eed16f Add specs for Admin::AccountModerationNotesHelper (#9455) 2018-12-07 16:39:20 +01:00
ysksnandEugen Rochko 57bb62d5cf Remove pending spec (#9454)
Since dots are not allowed in username,
this spec is no longer needed.
2018-12-07 16:38:50 +01:00
ysksnandEugen Rochko 51cbd045da Add specs for AccountTagStat model (#9452) 2018-12-07 16:37:56 +01:00
ysksnandYamagishi Kazutoshi 155cf12680 Remove pending spec (#9442)
`#from_account` isn't defined.
2018-12-06 17:39:15 +09:00
ysksnandYamagishi Kazutoshi e2910dff12 Add spec for Identity.find_for_oauth (#9441) 2018-12-06 17:38:49 +09:00
ysksnandEugen Rochko 1104ac35d3 Add tests for Streamable (#5771) 2017-11-24 14:42:57 +01:00
ysksnandEugen Rochko 8c0e77d688 Add tests for AccountRelationshipsPresenter (#5805) 2017-11-24 14:41:04 +01:00
ysksnandYamagishi Kazutoshi 6f609dc4b4 Add tests for Remotable (#5768) 2017-11-21 13:59:36 +09:00
ysksnandEugen Rochko 2590aac863 Add tests for AccountInteractions (#5751)
* Add tests for class methods of AccountInteractions

* Add tests for instance methods of AccountInteractions
2017-11-19 04:16:14 +01:00
ysksnandEugen Rochko 8f638a2bf2 Add a test for Settings::Extend#settings (#5720) 2017-11-19 04:15:32 +01:00
ysksnandEugen Rochko 9d9b1aff1e Add tests for Status#title (#5718) 2017-11-19 04:15:17 +01:00
ysksnandYamagishi Kazutoshi 9dd5e329ab Remove empty strings (#5732) 2017-11-17 10:52:30 +09:00
ysksnandEugen Rochko 9e3d24a150 Fix AccountFinderConcern::AccountFinder#with_usernames (#5722) 2017-11-16 12:13:03 +01:00
ysksnandYamagishi Kazutoshi 556c07df1f Add tests for Status#verb (#5717) 2017-11-16 15:46:29 +09:00
ysksnandYamagishi Kazutoshi 3023725936 Add tests for Status#hidden? (#5719) 2017-11-16 11:07:27 +09:00
ysksnandEugen Rochko 19e8b861a2 Delegate some methods of User to @settings (#5706)
* Move some tests of User into Settings::ScopedSettings

* Add a test for User@settings
2017-11-15 16:05:20 +01:00
ysksnandEugen Rochko 7d7df877ef Add a test for Tag#to_param (#5705) 2017-11-15 16:04:41 +01:00
ysksnandEugen Rochko 6d7e05ec1f Add tests for StreamEntry (#5687)
* Add tests for StreamEntry

- `#object_type`
- `#verb`
- `#mentions`

* Fix to test results instead of implementations
2017-11-15 02:00:58 +01:00
ysksnandEugen Rochko 48e27c47a7 Add a test for SiteUpload#cache_key (#5685) 2017-11-14 20:44:11 +01:00
ysksnandYamagishi Kazutoshi 4112a0631f Add tests for Setting (#5683) 2017-11-14 11:08:04 +09:00
ysksnandYamagishi Kazutoshi 60f247c2e7 Add tests for SessionActivation (#5668)
* Fabricate SessionActivation

not only user_id but user association.

* Add tests for SessionActivation
2017-11-13 09:54:48 +09:00
ysksnandYamagishi Kazutoshi 2fb722397d Add tests for RemoteProfile (#5665) 2017-11-12 16:23:31 +09:00
ysksnandEugen Rochko 56720ba590 Add tests for RemoteFollow (#5651)
* Add tests for RemoteFollow.initialize

* Add tests for RemoteFollow#valid?

* Add tests for RemoteFollow#subscribe_address_for
2017-11-10 16:56:02 +01:00
ysksnandEugen Rochko 07cca6e364 Add tests for Notification (#5640)
* Add tests for Notification#target_status

* Add tests for Notification#browserable?

* Add tests for Notification.reload_stale_associations!
2017-11-09 14:37:10 +01:00
ysksnandEugen Rochko 54b42901df Add and Remove tests for FollowRequest (#5622)
* Add a test for FollowRequest#authorize!

* Remove tests

There is no need to test
ActiveModel::Validations::ClassMethods#validates.

* Make an alias of destroy! as reject!

Instead of defining the method,
make an alias of destroy! as reject! because of reducing test.
2017-11-09 14:36:52 +01:00
ysksnandYamagishi Kazutoshi 64cc129225 Add tests for MediaAttachment (#5620)
- `#local?`
- `#needs_redownload?`
- `#to_param`
2017-11-08 15:29:07 +09:00
ysksnandYamagishi Kazutoshi 97fc2da2e0 Add tests for CustomEmoji#local? and #object_type (#5621) 2017-11-08 15:28:17 +09:00
ysksnandYamagishi Kazutoshi d307ee79e9 Implement tests for Account#refresh! (#5601) 2017-11-06 13:54:41 +09:00
ysksnandYamagishi Kazutoshi cf01326cc1 Add test for Account#save_with_optional_media! (#5603)
There was a test when some of the properties are invalid, but none when all
of them are valid.
2017-11-06 13:54:12 +09:00
ysksnandYamagishi Kazutoshi 15c0f6ae56 Implement tests for Account#possibly_stale? (#5591) 2017-11-05 17:20:05 +09:00