checkoff 0.248.0 → 0.250.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/rbi/checkoff.rbi CHANGED
@@ -75,7 +75,7 @@ module Overcommit
75
75
  end
76
76
 
77
77
  module Checkoff
78
- VERSION = '0.248.0'
78
+ VERSION = '0.250.0'
79
79
 
80
80
  class Attachments
81
81
  include Logging
@@ -2442,7 +2442,7 @@ end
2442
2442
  # typed: ignore
2443
2443
  # Command-line and gem client for Asana (unofficial)
2444
2444
  module Checkoff
2445
- VERSION = T.let('0.248.0', T.untyped)
2445
+ VERSION = T.let('0.250.0', T.untyped)
2446
2446
 
2447
2447
  # Move tasks from one place to another
2448
2448
  class MvSubcommand
@@ -6760,23 +6760,6 @@ end - [Checkoff::SelectorClasses::Section::FunctionEvaluator]).freeze, T.untyped
6760
6760
  sig { returns(Asana::Client) }
6761
6761
  attr_reader :client
6762
6762
  end
6763
-
6764
- # Remove TIME_BY_PERIOD redeclarations Sord emits on BaseAsana test subclasses.
6765
- module PruneRbiTestConstants
6766
- SUBCLASSES = T.let(%w[TestTasks TestProjects TestSections TestWorkspaces].freeze, T.untyped)
6767
-
6768
- # _@param_ `klass`
6769
- sig { params(klass: String).returns(Regexp) }
6770
- def self.pattern_for(klass); end
6771
-
6772
- # _@param_ `path`
6773
- sig { params(path: String).void }
6774
- def self.call(path); end
6775
-
6776
- # _@param_ `content`
6777
- sig { params(content: String).returns(String) }
6778
- def self.prune_subclasses(content); end
6779
- end
6780
6763
  end
6781
6764
 
6782
6765
  # include this to add ability to log at different levels
@@ -6834,2145 +6817,3 @@ module Asana
6834
6817
  end
6835
6818
  end
6836
6819
  end
6837
-
6838
- # :nocov:
6839
- # Module which adds helpers to run tests as if it was a specific date.
6840
- module TestDate
6841
- TIME_BY_PERIOD = T.let({
6842
- two_am: '02:00:20',
6843
- morning_during_breakfast: '07:30:20',
6844
- morning: '07:33:20',
6845
- eight_thirty_am: '8:30:00',
6846
- ten_am: '10:00:20',
6847
- mid_morning: '10:33:20',
6848
- eleven_thirty_am: '11:30:00',
6849
- afternoon: '14:33:20',
6850
- three_forty_five_pm: '15:45:20',
6851
- four_fifteen_pm: '16:15:20',
6852
- four_forty_five_pm: '16:45:20',
6853
- five_forty_five_pm: '17:45:20',
6854
- six_fifteen_pm: '18:15:00',
6855
- six_forty_five_pm: '18:45:00',
6856
- night: '19:00:20',
6857
- evening: '19:01:20',
6858
- late_evening: '21:33:20',
6859
- late_late_evening: '22:33:20',
6860
- }.freeze, T.untyped)
6861
-
6862
- sig { void }
6863
- def mock_date; end
6864
-
6865
- sig { params(zone: T.untyped).returns(T.untyped) }
6866
- def time_by_period(zone); end
6867
-
6868
- sig { params(zone: T.untyped).void }
6869
- def mock_now_with_zone(zone); end
6870
-
6871
- sig { void }
6872
- def mock_now; end
6873
-
6874
- sig { returns(T.untyped) }
6875
- attr_accessor :time_period
6876
-
6877
- sig { returns(T.untyped) }
6878
- attr_accessor :mock_date_str
6879
- end
6880
-
6881
- class TestTags < ClassTest
6882
- extend Forwardable
6883
-
6884
- sig { void }
6885
- def test_tag_or_raise_raises; end
6886
-
6887
- sig { void }
6888
- def test_tag_or_raise; end
6889
-
6890
- sig { returns(T.untyped) }
6891
- def expect_workspace_pulled; end
6892
-
6893
- sig { void }
6894
- def allow_tags_named; end
6895
-
6896
- sig { params(tag_arr: T.untyped).void }
6897
- def expect_tags_pulled(tag_arr); end
6898
-
6899
- sig { void }
6900
- def test_tag; end
6901
-
6902
- sig { params(only_uncompleted: T.untyped).void }
6903
- def mock_tasks(only_uncompleted: true); end
6904
-
6905
- sig { params(only_uncompleted: T.untyped).void }
6906
- def build_task_params(only_uncompleted); end
6907
-
6908
- sig { void }
6909
- def build_response_body; end
6910
-
6911
- sig { params(task_endpoint: T.untyped, task_params: T.untyped, merged_task_options: T.untyped).void }
6912
- def setup_client_expects(task_endpoint, task_params, merged_task_options); end
6913
-
6914
- sig { params(response_body: T.untyped).void }
6915
- def setup_response_expects(response_body); end
6916
-
6917
- sig { void }
6918
- def setup_collection_expects; end
6919
-
6920
- sig { void }
6921
- def generate_task_options; end
6922
-
6923
- sig { void }
6924
- def generate_merged_task_options; end
6925
-
6926
- sig { void }
6927
- def generate_task_endpoint; end
6928
-
6929
- sig { void }
6930
- def projects; end
6931
-
6932
- sig { void }
6933
- def test_tasks; end
6934
-
6935
- sig { void }
6936
- def test_tasks_with_completed; end
6937
-
6938
- sig { void }
6939
- def respond_like_instance_of; end
6940
-
6941
- sig { void }
6942
- def respond_like; end
6943
-
6944
- sig { void }
6945
- def class_under_test; end
6946
- end
6947
-
6948
- # Unit test Asana-related classes
6949
- class BaseAsana < ClassTest
6950
- include TestDate
6951
-
6952
- sig { params(extra_fields: T.untyped).void }
6953
- def task_options(extra_fields: []); end
6954
-
6955
- sig { void }
6956
- def task_options_with_completed; end
6957
-
6958
- sig { void }
6959
- def mock_date; end
6960
-
6961
- sig { params(zone: T.untyped).returns(T.untyped) }
6962
- def time_by_period(zone); end
6963
-
6964
- sig { params(zone: T.untyped).void }
6965
- def mock_now_with_zone(zone); end
6966
-
6967
- sig { void }
6968
- def mock_now; end
6969
- end
6970
-
6971
- # Test a class that uses initializer mocks.
6972
- class ClassTest < Minitest::Test
6973
- # Implement 'class_under_test' returning the class name to be
6974
- # initialized with keyword mocks
6975
- #
6976
- # obj = get_test_object do
6977
- # # Go ahead and use concrete value for constructor arg
6978
- # @mocks[:some_constructor_arg] = 123
6979
- # end
6980
- sig { params(clazz: T.untyped, twiddle_mocks: T.untyped).void }
6981
- def get_test_object(clazz = class_under_test, &twiddle_mocks); end
6982
-
6983
- sig { void }
6984
- def respond_like_instance_of; end
6985
-
6986
- sig { void }
6987
- def respond_like; end
6988
-
6989
- sig { params(clazz: T.untyped).void }
6990
- def create_object(clazz = class_under_test); end
6991
- end
6992
-
6993
- # Test the Checkoff::Tasks class
6994
- class TestTasks < BaseAsana
6995
- extend Forwardable
6996
- sig { void }
6997
- def expect_workspaces_created; end
6998
-
6999
- sig { void }
7000
- def expect_config_loaded; end
7001
-
7002
- sig { void }
7003
- def expect_sections_created; end
7004
-
7005
- sig { void }
7006
- def expect_tasks_created; end
7007
-
7008
- sig { void }
7009
- def set_mocks; end
7010
-
7011
- sig { params(_twiddle_mocks: T.untyped).void }
7012
- def get_test_object(&_twiddle_mocks); end
7013
-
7014
- sig { void }
7015
- def mock_mv_original_use_case; end
7016
-
7017
- sig { void }
7018
- def test_mv_original_use_case; end
7019
- end
7020
-
7021
- class TestEvents < ClassTest
7022
- extend Forwardable
7023
-
7024
- sig { void }
7025
- def mock_filter_asana_events_true; end
7026
-
7027
- sig { void }
7028
- def test_filter_asana_events_true; end
7029
-
7030
- sig { void }
7031
- def test_filter_asana_events_false; end
7032
-
7033
- sig { void }
7034
- def class_under_test; end
7035
-
7036
- sig { void }
7037
- def respond_like_instance_of; end
7038
-
7039
- sig { void }
7040
- def respond_like; end
7041
- end
7042
-
7043
- # No security (symbold denial of servie) issue; not building
7044
- # OpenStruct from untrusted user data.
7045
- #
7046
- # rubocop:disable Style/OpenStructUse
7047
- class MyOpenStruct < OpenStruct
7048
- sig { params(sym: T.untyped).void }
7049
- def delete(sym); end
7050
-
7051
- sig { params(hash: T.untyped).returns(T.untyped) }
7052
- def merge!(hash); end
7053
- end
7054
-
7055
- module Mocha
7056
- class Mock
7057
- sig { params(expected: T.untyped).returns(T::Boolean) }
7058
- def is_a?(expected); end
7059
- end
7060
- end
7061
-
7062
- class TestTiming < ClassTest
7063
- extend Forwardable
7064
-
7065
- sig { void }
7066
- def test_in_period_this_week_date_true; end
7067
-
7068
- sig { void }
7069
- def test_in_period_this_week_nil_true; end
7070
-
7071
- sig { void }
7072
- def test_in_period_day_of_week_nil_false; end
7073
-
7074
- sig { void }
7075
- def test_in_period_day_of_week_saturday_false; end
7076
-
7077
- sig { void }
7078
- def test_in_period_indefinite_true; end
7079
-
7080
- sig { void }
7081
- def test_in_period_bad_period; end
7082
-
7083
- sig { void }
7084
- def test_in_period_bad_compound_period; end
7085
-
7086
- sig { void }
7087
- def class_under_test; end
7088
-
7089
- sig { void }
7090
- def respond_like_instance_of; end
7091
-
7092
- sig { void }
7093
- def respond_like; end
7094
- end
7095
-
7096
- class TestClients < ClassTest
7097
- extend Forwardable
7098
-
7099
- sig { void }
7100
- def expect_client_created; end
7101
-
7102
- sig { void }
7103
- def mock_client; end
7104
-
7105
- sig { void }
7106
- def test_client; end
7107
-
7108
- sig { void }
7109
- def class_under_test; end
7110
- end
7111
-
7112
- # Test the Checkoff::CLI class with the help option
7113
- class TestCLIHelp < Minitest::Test
7114
- sig { void }
7115
- def expect_workspaces_created; end
7116
-
7117
- sig { void }
7118
- def expect_config_loaded; end
7119
-
7120
- sig { void }
7121
- def expect_sections_created; end
7122
-
7123
- sig { void }
7124
- def expect_tasks_created; end
7125
-
7126
- sig { returns(T.untyped) }
7127
- def set_mocks; end
7128
-
7129
- sig { params(twiddle_mocks: T.untyped).void }
7130
- def get_test_object(&twiddle_mocks); end
7131
-
7132
- sig { void }
7133
- def test_run_with_help_arg; end
7134
- end
7135
-
7136
- # Test the Checkoff::CLI class with view subcommand
7137
- class TestCLIView < Minitest::Test
7138
- sig { void }
7139
- def expected_json_no_section_specified; end
7140
-
7141
- sig { void }
7142
- def section_name_str; end
7143
-
7144
- sig { void }
7145
- def project_name; end
7146
-
7147
- sig { void }
7148
- def task_name; end
7149
-
7150
- sig { void }
7151
- def expect_tasks_by_section_pulled; end
7152
-
7153
- sig { void }
7154
- def expect_client_pulled; end
7155
-
7156
- sig { params(due_on: T.untyped, due_at: T.untyped).void }
7157
- def mock_run_with_no_section_specified_normal_project(due_on:, due_at:); end
7158
-
7159
- sig { params(task: T.untyped, task_name: T.untyped).void }
7160
- def expect_task_named(task, task_name); end
7161
-
7162
- sig { params(task: T.untyped, due_on: T.untyped).void }
7163
- def expect_task_due_on(task, due_on); end
7164
-
7165
- sig { params(task: T.untyped, due_at: T.untyped).void }
7166
- def expect_task_due_at(task, due_at); end
7167
-
7168
- sig { void }
7169
- def three_tasks; end
7170
-
7171
- sig do
7172
- params(
7173
- task: T.untyped,
7174
- task_name: T.untyped,
7175
- due_on: T.untyped,
7176
- due_at: T.untyped
7177
- ).void
7178
- end
7179
- def expect_task_queried(task, task_name, due_on, due_at); end
7180
-
7181
- sig { params(due_on: T.untyped, due_at: T.untyped).returns(T.untyped) }
7182
- def expect_three_tasks_queried(due_on:, due_at:); end
7183
-
7184
- sig { void }
7185
- def workspace_name; end
7186
-
7187
- sig { void }
7188
- def allow_workspaces_created; end
7189
-
7190
- sig { void }
7191
- def allow_config_loaded; end
7192
-
7193
- sig { void }
7194
- def allow_sections_created; end
7195
-
7196
- sig { void }
7197
- def allow_tasks_created; end
7198
-
7199
- sig { void }
7200
- def allow_clients_created; end
7201
-
7202
- sig { void }
7203
- def set_mocks; end
7204
-
7205
- sig { params(_twiddle_mocks: T.untyped).void }
7206
- def get_test_object(&_twiddle_mocks); end
7207
-
7208
- sig { void }
7209
- def test_run_with_no_section_specified_normal_project; end
7210
-
7211
- sig do
7212
- params(
7213
- project_name: T.untyped,
7214
- section_name: T.untyped,
7215
- due_on: T.untyped,
7216
- due_at: T.untyped
7217
- ).void
7218
- end
7219
- def expect_three_tasks_pulled_and_queried(project_name:, section_name:, due_on:, due_at:); end
7220
-
7221
- sig do
7222
- params(
7223
- project_name: T.untyped,
7224
- section_name: T.untyped,
7225
- due_at: T.untyped,
7226
- due_on: T.untyped
7227
- ).void
7228
- end
7229
- def mock_view(project_name:, section_name:, due_at:, due_on:); end
7230
-
7231
- sig { params(section_name: T.untyped).void }
7232
- def mock_view_specific_task(section_name:); end
7233
-
7234
- sig { void }
7235
- def test_view_specific_task_nil_section; end
7236
-
7237
- sig { void }
7238
- def test_view_specific_task; end
7239
-
7240
- sig { void }
7241
- def expected_json_section_specified; end
7242
-
7243
- sig { void }
7244
- def mock_view_run_with_section_specified_empty_section; end
7245
-
7246
- sig { void }
7247
- def test_view_run_with_section_specified_empty_section; end
7248
-
7249
- sig { returns(T.untyped) }
7250
- def mock_view_run_with_section_specified_normal_project_colon_project; end
7251
-
7252
- sig { returns(T.untyped) }
7253
- def test_view_run_with_section_specified_normal_project_colon_project; end
7254
-
7255
- sig { void }
7256
- def mock_view_run_with_section_specified_normal_project; end
7257
-
7258
- sig { returns(T.untyped) }
7259
- def test_view_run_with_section_specified_normal_project; end
7260
-
7261
- sig { void }
7262
- def mock_run_with_no_project_specified; end
7263
-
7264
- sig { void }
7265
- def test_run_with_no_project_specified; end
7266
-
7267
- sig { returns(T.untyped) }
7268
- def expected_json_view_not_due; end
7269
-
7270
- sig { returns(T.untyped) }
7271
- def test_view_not_due; end
7272
-
7273
- sig { void }
7274
- def expected_json_view_due_at; end
7275
-
7276
- sig { returns(T.untyped) }
7277
- def test_view_due_at; end
7278
- end
7279
-
7280
- # Test the Checkoff::Projects class
7281
- class TestProjects < BaseAsana
7282
- extend Forwardable
7283
- extend Forwardable
7284
- TIME_BY_PERIOD = T.let({
7285
- two_am: '02:00:20',
7286
- morning_during_breakfast: '07:30:20',
7287
- morning: '07:33:20',
7288
- eight_thirty_am: '8:30:00',
7289
- ten_am: '10:00:20',
7290
- mid_morning: '10:33:20',
7291
- eleven_thirty_am: '11:30:00',
7292
- afternoon: '14:33:20',
7293
- three_forty_five_pm: '15:45:20',
7294
- four_fifteen_pm: '16:15:20',
7295
- four_forty_five_pm: '16:45:20',
7296
- five_forty_five_pm: '17:45:20',
7297
- six_fifteen_pm: '18:15:00',
7298
- six_forty_five_pm: '18:45:00',
7299
- night: '19:00:20',
7300
- evening: '19:01:20',
7301
- late_evening: '21:33:20',
7302
- late_late_evening: '22:33:20',
7303
- }.freeze, T.untyped)
7304
-
7305
- sig { void }
7306
- def test_section_task_names_no_tasks; end
7307
-
7308
- sig { returns(T.untyped) }
7309
- def projects; end
7310
-
7311
- sig { void }
7312
- def test_section_task_names; end
7313
-
7314
- sig { void }
7315
- def mock_sections_or_raise; end
7316
-
7317
- sig { void }
7318
- def test_sections_or_raise; end
7319
-
7320
- sig { void }
7321
- def test_sections_or_raise_nil_project_name; end
7322
-
7323
- sig { params(project: T.untyped, tasks_arr: T.untyped, active_tasks_arr: T.untyped).void }
7324
- def expect_my_tasks_pulled(project, tasks_arr, active_tasks_arr); end
7325
-
7326
- sig { params(section: T.untyped, name: T.untyped).void }
7327
- def expect_section_named(section, name); end
7328
-
7329
- sig { params(task: T.untyped, section: T.untyped).void }
7330
- def expect_assignee_section_pulled(task, section); end
7331
-
7332
- sig { void }
7333
- def expect_my_tasks_sections_pulled; end
7334
-
7335
- sig { returns(T.untyped) }
7336
- def expect_my_tasks_tasks_pulled; end
7337
-
7338
- sig { void }
7339
- def mock_tasks_by_section_my_tasks; end
7340
-
7341
- sig { void }
7342
- def test_tasks_by_section_my_tasks; end
7343
-
7344
- sig { returns(T.untyped) }
7345
- def test_tasks_by_section_nil_workspace_name; end
7346
-
7347
- sig { void }
7348
- def test_tasks_by_section_nil_project_name; end
7349
-
7350
- sig { void }
7351
- def test_tasks_by_section_some_in_empty_section; end
7352
-
7353
- sig { void }
7354
- def expect_project_a_tasks_pulled; end
7355
-
7356
- sig { returns(T.untyped) }
7357
- def test_tasks_by_section; end
7358
-
7359
- sig { params(task: T.untyped, name: T.untyped).void }
7360
- def expect_named(task, name); end
7361
-
7362
- sig { params(project: T.untyped, tasks_arr: T.untyped, active_tasks_arr: T.untyped).void }
7363
- def expect_tasks_pulled(project, tasks_arr, active_tasks_arr); end
7364
-
7365
- sig { params(workspace: T.untyped, project: T.untyped, project_name: T.untyped).void }
7366
- def expect_project_pulled(workspace, project, project_name); end
7367
-
7368
- sig { returns(T.untyped) }
7369
- def expect_task_project_memberships_queried; end
7370
-
7371
- sig { params(section_name: T.untyped).returns(T.untyped) }
7372
- def expect_task_section_memberships_queried(section_name); end
7373
-
7374
- sig { params(section_name: T.untyped).returns(T.untyped) }
7375
- def expect_task_memberships_queried(section_name); end
7376
-
7377
- sig do
7378
- params(
7379
- workspace: T.untyped,
7380
- project: T.untyped,
7381
- project_name: T.untyped,
7382
- section_name: T.untyped
7383
- ).returns(T.untyped)
7384
- end
7385
- def expect_tasks_and_sections_pulled(workspace, project, project_name, section_name); end
7386
-
7387
- sig { params(project: T.untyped, gid: T.untyped).void }
7388
- def expect_project_gid_pulled(project, gid); end
7389
-
7390
- sig { returns(T.untyped) }
7391
- def expect_sections_client_pulled; end
7392
-
7393
- sig { params(project_gid: T.untyped, sections_array: T.untyped).void }
7394
- def expect_project_sections_pulled(project_gid, sections_array); end
7395
-
7396
- sig { void }
7397
- def original_task_options; end
7398
-
7399
- sig { params(only_uncompleted: T.untyped).returns(T.untyped) }
7400
- def fixed_task_options(only_uncompleted:); end
7401
-
7402
- sig { params(section_gid: T.untyped, task_list: T.untyped, only_uncompleted: T.untyped).void }
7403
- def expect_tasks_api_called_for_section(section_gid, task_list, only_uncompleted:); end
7404
-
7405
- sig { void }
7406
- def expect_section_1_gid_pulled; end
7407
-
7408
- sig { returns(T.untyped) }
7409
- def expect_section_2_gid_pulled; end
7410
-
7411
- sig { returns(T.untyped) }
7412
- def expect_client_tasks_api_pulled; end
7413
-
7414
- sig do
7415
- params(
7416
- section: T.untyped,
7417
- section_gid: T.untyped,
7418
- task_list: T.untyped,
7419
- only_uncompleted: T.untyped
7420
- ).returns(T.untyped)
7421
- end
7422
- def expect_section_tasks_pulled(section, section_gid, task_list, only_uncompleted:); end
7423
-
7424
- sig { void }
7425
- def test_tasks_not_only_uncompleted; end
7426
-
7427
- sig { returns(T.untyped) }
7428
- def allow_section_1_name_pulled; end
7429
-
7430
- sig { returns(T.untyped) }
7431
- def allow_section_2_name_pulled; end
7432
-
7433
- sig { returns(T.untyped) }
7434
- def allow_empty_section_name_pulled; end
7435
-
7436
- sig { params(only_uncompleted: T.untyped).void }
7437
- def mock_tasks_normal_project(only_uncompleted:); end
7438
-
7439
- sig { returns(T.untyped) }
7440
- def test_tasks_normal_project; end
7441
-
7442
- sig { void }
7443
- def test_tasks_by_section_gid; end
7444
-
7445
- sig { void }
7446
- def test_tasks_by_section_also_completed; end
7447
-
7448
- sig { returns(T.untyped) }
7449
- def mock_tasks_inbox; end
7450
-
7451
- sig { returns(T.untyped) }
7452
- def test_tasks_inbox; end
7453
-
7454
- sig { returns(T.untyped) }
7455
- def test_tasks_section_not_found; end
7456
-
7457
- sig { returns(T.untyped) }
7458
- def test_tasks_project_not_found; end
7459
-
7460
- sig { void }
7461
- def test_previous_section; end
7462
-
7463
- sig { returns(T.untyped) }
7464
- def test_previous_section_on_inbox_returns_nil; end
7465
-
7466
- sig { void }
7467
- def test_section_by_gid; end
7468
-
7469
- sig { void }
7470
- def test_section_by_gid_bad_server_data; end
7471
-
7472
- sig { void }
7473
- def respond_like_instance_of; end
7474
-
7475
- sig { void }
7476
- def respond_like; end
7477
-
7478
- sig { void }
7479
- def class_under_test; end
7480
- end
7481
-
7482
- class TestSubtasks < ClassTest
7483
- extend Forwardable
7484
-
7485
- sig { void }
7486
- def task_options; end
7487
-
7488
- sig { void }
7489
- def subtask_options; end
7490
-
7491
- # refute(subtasks.all_subtasks_completed?(task))
7492
- # end
7493
- sig { params(active_subtasks: T.untyped).returns(T.untyped) }
7494
- def expect_active_subtasks_pulled(active_subtasks); end
7495
-
7496
- sig { void }
7497
- def allow_all_section_status_queried; end
7498
-
7499
- # assert(subtasks.all_subtasks_completed?(task))
7500
- # end
7501
- sig { params(subtask: T.untyped, result: T.untyped).returns(T.untyped) }
7502
- def allow_subtask_section_status_queried(subtask, result); end
7503
-
7504
- sig { void }
7505
- def allow_subtask_section_1_named; end
7506
-
7507
- sig { void }
7508
- def allow_subtask_section_2_named; end
7509
-
7510
- sig { void }
7511
- def allow_subtask_section_3_named; end
7512
-
7513
- sig { void }
7514
- def allow_subtask_names_queried; end
7515
-
7516
- sig { void }
7517
- def mock_by_section; end
7518
-
7519
- sig { void }
7520
- def expect_raw_subtasks_pulled; end
7521
-
7522
- sig { void }
7523
- def class_under_test; end
7524
-
7525
- sig { void }
7526
- def respond_like_instance_of; end
7527
-
7528
- sig { void }
7529
- def respond_like; end
7530
- end
7531
-
7532
- class TestTimelines < ClassTest
7533
- extend Forwardable
7534
-
7535
- sig { void }
7536
- def test_task_dependent_on_previous_section_last_milestone_no_memberships; end
7537
-
7538
- sig { void }
7539
- def mock_task_dependent_on_previous_section_last_milestone_false_no_dependencies; end
7540
-
7541
- sig { void }
7542
- def test_task_dependent_on_previous_section_last_milestone_false_no_dependencies_; end
7543
-
7544
- sig { params(task: T.untyped, task_data: T.untyped).void }
7545
- def expect_task_data_created(task, task_data); end
7546
-
7547
- sig { returns(T.untyped) }
7548
- def expect_section_2_pulled; end
7549
-
7550
- sig { void }
7551
- def expect_section_2_previous_section_called; end
7552
-
7553
- sig { void }
7554
- def expect_section_1_gid_pulled; end
7555
-
7556
- sig { void }
7557
- def expect_no_section_1_tasks; end
7558
-
7559
- sig { void }
7560
- def mock_task_dependent_on_previous_section_last_milestone_true_no_tasks; end
7561
-
7562
- sig { void }
7563
- def test_task_dependent_on_previous_section_last_milestone_true_no_tasks; end
7564
-
7565
- sig { void }
7566
- def expect_section_1_tasks_pulled; end
7567
-
7568
- sig { void }
7569
- def expect_milestone_queried; end
7570
-
7571
- sig { void }
7572
- def mock_task_dependent_on_previous_section_last_milestone_true; end
7573
-
7574
- sig { returns(T.untyped) }
7575
- def test_task_dependent_on_previous_section_last_milestone_true; end
7576
-
7577
- sig { void }
7578
- def mock_task_dependent_on_previous_section_last_milestone_false_no_previous_section; end
7579
-
7580
- sig { void }
7581
- def test_task_dependent_on_previous_section_last_milestone_false_no_previous_section; end
7582
-
7583
- sig { void }
7584
- def test_last_task_milestone_depends_on_this_task_no_memberships; end
7585
-
7586
- sig { params(task: T.untyped, dependents: T.untyped).returns(T.untyped) }
7587
- def expect_all_dependent_tasks_pulled(task, dependents); end
7588
-
7589
- sig { params(task: T.untyped, memberships: T.untyped).void }
7590
- def expect_memberships_pulled(task, memberships); end
7591
-
7592
- sig { params(tasks: T.untyped).void }
7593
- def expect_tasks_by_section_gid_pulled(tasks); end
7594
-
7595
- sig { void }
7596
- def expect_milestone_details_pulled; end
7597
-
7598
- sig { void }
7599
- def expect_task_gid_pulled; end
7600
-
7601
- sig { void }
7602
- def test_last_task_milestone_depends_on_this_task_false; end
7603
-
7604
- sig { void }
7605
- def test_last_task_milestone_depends_on_this_task_no_milestone; end
7606
-
7607
- sig { void }
7608
- def test_last_task_milestone_depends_on_this_task_is_last_milestone; end
7609
-
7610
- sig { params(projects: T.untyped).void }
7611
- def export_portfolio_projects_pulled(projects); end
7612
-
7613
- sig { void }
7614
- def test_last_task_milestone_depends_on_this_task_is_last_milestone_limited_to_portfolio_no_projects; end
7615
-
7616
- sig { void }
7617
- def mock_last_task_milestone_depends_on_this_task_is_last_milestone_limited_to_portfolio; end
7618
-
7619
- sig { void }
7620
- def test_last_task_milestone_depends_on_this_task_is_last_milestone_limited_to_portfolio; end
7621
-
7622
- sig { void }
7623
- def test_init; end
7624
-
7625
- sig { void }
7626
- def test_any_milestone_depends_on_this_task_false; end
7627
-
7628
- sig { void }
7629
- def test_any_milestone_depends_on_this_task_true; end
7630
-
7631
- sig { void }
7632
- def class_under_test; end
7633
-
7634
- sig { void }
7635
- def respond_like_instance_of; end
7636
-
7637
- sig { void }
7638
- def respond_like; end
7639
- end
7640
-
7641
- class TestPortfolios < ClassTest
7642
- extend Forwardable
7643
-
7644
- sig { void }
7645
- def test_portfolio_or_raise_raises; end
7646
-
7647
- sig { void }
7648
- def test_portfolio_or_raise; end
7649
-
7650
- sig { returns(T.untyped) }
7651
- def expect_workspace_pulled; end
7652
-
7653
- sig { void }
7654
- def allow_portfolios_named; end
7655
-
7656
- sig { void }
7657
- def expect_portfolios_api_pulled; end
7658
-
7659
- sig { void }
7660
- def expect_me_gid_pulled; end
7661
-
7662
- sig { params(portfolio_arr: T.untyped).returns(T.untyped) }
7663
- def expect_portfolios_pulled(portfolio_arr); end
7664
-
7665
- sig { void }
7666
- def test_portfolio; end
7667
-
7668
- sig { void }
7669
- def test_portfolio_by_gid; end
7670
-
7671
- sig { void }
7672
- def test_projects_in_portfolios; end
7673
-
7674
- sig { void }
7675
- def class_under_test; end
7676
-
7677
- sig { void }
7678
- def respond_like_instance_of; end
7679
-
7680
- sig { void }
7681
- def respond_like; end
7682
- end
7683
-
7684
- # Test the Checkoff::Workspaces class
7685
- class TestWorkspaces < BaseAsana
7686
- extend Forwardable
7687
- extend Forwardable
7688
-
7689
- sig { params(url: T.untyped).void }
7690
- def mock_create_attachment_from_url(url); end
7691
-
7692
- sig { void }
7693
- def test_create_attachment_from_url; end
7694
-
7695
- # _@param_ `gid`
7696
- #
7697
- # _@param_ `url`
7698
- sig { params(gid: String, url: String).returns(Mocha::Mock) }
7699
- def expect_run_on_attachment(gid, url); end
7700
-
7701
- sig { returns(String) }
7702
- def capture_attachments_run; end
7703
-
7704
- sig { void }
7705
- def test_run; end
7706
-
7707
- sig { void }
7708
- def class_under_test; end
7709
-
7710
- sig { void }
7711
- def respond_like_instance_of; end
7712
-
7713
- sig { void }
7714
- def respond_like; end
7715
- end
7716
-
7717
- # double to inject cache_method, pretending to be cache_method gem
7718
- class Class
7719
- sig { params(method_id: T.untyped, _ttl: T.untyped).void }
7720
- def cache_method(method_id, _ttl = nil); end
7721
- end
7722
-
7723
- # double to inject cache_method_clear, pretending to be cache_method gem
7724
- module Kernel
7725
- sig { params(_method_id: T.untyped).void }
7726
- def cache_method_clear(_method_id); end
7727
- end
7728
-
7729
- # Test the Checkoff::CLI class with quickadd subcommand
7730
- class TestCLIQuickadd < Minitest::Test
7731
- sig { void }
7732
- def workspace_name; end
7733
-
7734
- sig { void }
7735
- def expect_workspaces_created; end
7736
-
7737
- sig { void }
7738
- def expect_config_loaded; end
7739
-
7740
- sig { void }
7741
- def expect_sections_created; end
7742
-
7743
- sig { returns(T.untyped) }
7744
- def expect_tasks_created; end
7745
-
7746
- sig { returns(T.untyped) }
7747
- def set_mocks; end
7748
-
7749
- sig { params(_twiddle_mocks: T.untyped).void }
7750
- def get_test_object(&_twiddle_mocks); end
7751
-
7752
- sig { void }
7753
- def mock_quickadd; end
7754
-
7755
- sig { void }
7756
- def test_quickadd; end
7757
- end
7758
-
7759
- class TestCustomFields < ClassTest
7760
- extend Forwardable
7761
-
7762
- sig { void }
7763
- def test_custom_field_or_raise_raises; end
7764
-
7765
- sig { void }
7766
- def test_custom_field_or_raise; end
7767
-
7768
- sig { returns(T.untyped) }
7769
- def expect_workspace_pulled; end
7770
-
7771
- sig { void }
7772
- def allow_custom_fields_named; end
7773
-
7774
- sig { params(custom_field_arr: T.untyped).void }
7775
- def expect_custom_fields_pulled(custom_field_arr); end
7776
-
7777
- sig { void }
7778
- def test_custom_field; end
7779
-
7780
- sig { void }
7781
- def class_under_test; end
7782
- end
7783
-
7784
- # Test the Checkoff::MvSubcommand class used in CLI processing
7785
- class TestMvSubcommand < ClassTest
7786
- extend Forwardable
7787
-
7788
- sig { params(arg: T.untyped).void }
7789
- def argument_to_name(arg); end
7790
-
7791
- sig { params(workspace_name: T.untyped, project_name: T.untyped, project: T.untyped).void }
7792
- def expect_project_pulled(workspace_name, project_name, project); end
7793
-
7794
- sig do
7795
- params(
7796
- workspace_name: T.untyped,
7797
- project_name: T.untyped,
7798
- section_name: T.untyped,
7799
- section: T.untyped
7800
- ).void
7801
- end
7802
- def expect_section_pulled(workspace_name, project_name, section_name, section); end
7803
-
7804
- sig do
7805
- params(
7806
- workspace_name: T.untyped,
7807
- project_name: T.untyped,
7808
- section_name: T.untyped,
7809
- tasks: T.untyped
7810
- ).void
7811
- end
7812
- def expect_tasks_pulled(workspace_name, project_name, section_name, tasks); end
7813
-
7814
- sig { params(task: T.untyped, task_name: T.untyped).void }
7815
- def expect_task_named(task, task_name); end
7816
-
7817
- sig { params(section: T.untyped, section_name: T.untyped).void }
7818
- def expect_section_named(section, section_name); end
7819
-
7820
- sig { params(project: T.untyped, project_gid: T.untyped).void }
7821
- def expect_project_gid_pulled(project, project_gid); end
7822
-
7823
- sig { params(section: T.untyped, section_gid: T.untyped).void }
7824
- def expect_section_gid_pulled(section, section_gid); end
7825
-
7826
- sig { params(task: T.untyped, project_gid: T.untyped, section_gid: T.untyped).void }
7827
- def expect_task_added_to_project(task, project_gid, section_gid); end
7828
-
7829
- sig { void }
7830
- def allow_logger_used; end
7831
-
7832
- sig { void }
7833
- def set_initializer_arguments; end
7834
-
7835
- sig { params(from_workspace_arg: T.untyped, to_workspace_arg: T.untyped).void }
7836
- def determine_to_workspace_name(from_workspace_arg, to_workspace_arg); end
7837
-
7838
- sig { params(from_project_name: T.untyped, to_project_arg: T.untyped).void }
7839
- def determine_to_project_name(from_project_name, to_project_arg); end
7840
-
7841
- sig { params(from_section_name: T.untyped, to_section_arg: T.untyped).void }
7842
- def determine_to_section_name(from_section_name, to_section_arg); end
7843
-
7844
- sig { params(task: T.untyped, task_name: T.untyped).void }
7845
- def expect_task_added_to_section(task, task_name); end
7846
-
7847
- sig { void }
7848
- def set_names; end
7849
-
7850
- sig { void }
7851
- def expect_to_objects_pulled; end
7852
-
7853
- sig { void }
7854
- def expect_run; end
7855
-
7856
- sig { void }
7857
- def mock_run_to_different_workspace; end
7858
-
7859
- sig { void }
7860
- def test_run_to_different_workspace; end
7861
-
7862
- sig { void }
7863
- def mock_run_from_all_sections; end
7864
-
7865
- sig { void }
7866
- def test_run_from_all_sections; end
7867
-
7868
- sig { void }
7869
- def mock_run_from_regular_project; end
7870
-
7871
- sig { void }
7872
- def test_run_from_regular_project; end
7873
-
7874
- sig { void }
7875
- def mock_run_to_same_section_different_project; end
7876
-
7877
- sig { void }
7878
- def test_run_to_same_section_different_project; end
7879
-
7880
- sig { void }
7881
- def mock_run_with_explicit_to_project; end
7882
-
7883
- sig { void }
7884
- def test_run_with_explicit_to_project; end
7885
-
7886
- sig { void }
7887
- def mock_run_from_my_tasks; end
7888
-
7889
- sig { void }
7890
- def test_run_from_my_tasks; end
7891
-
7892
- sig { void }
7893
- def mock_init_default_workspace_not_implemented; end
7894
-
7895
- sig { void }
7896
- def test_init_default_workspace_not_implemented; end
7897
-
7898
- sig { void }
7899
- def test_init; end
7900
-
7901
- sig { void }
7902
- def class_under_test; end
7903
-
7904
- # Returns the value of attribute from_workspace_arg.
7905
- sig { returns(T.untyped) }
7906
- attr_reader :from_workspace_arg
7907
-
7908
- # Returns the value of attribute from_project_arg.
7909
- sig { returns(T.untyped) }
7910
- attr_reader :from_project_arg
7911
-
7912
- # Returns the value of attribute from_section_arg.
7913
- sig { returns(T.untyped) }
7914
- attr_reader :from_section_arg
7915
-
7916
- # Returns the value of attribute to_workspace_arg.
7917
- sig { returns(T.untyped) }
7918
- attr_reader :to_workspace_arg
7919
-
7920
- # Returns the value of attribute to_project_arg.
7921
- sig { returns(T.untyped) }
7922
- attr_reader :to_project_arg
7923
-
7924
- # Returns the value of attribute to_section_arg.
7925
- sig { returns(T.untyped) }
7926
- attr_reader :to_section_arg
7927
-
7928
- # Returns the value of attribute from_workspace_name.
7929
- sig { returns(T.untyped) }
7930
- attr_reader :from_workspace_name
7931
-
7932
- # Returns the value of attribute from_project_name.
7933
- sig { returns(T.untyped) }
7934
- attr_reader :from_project_name
7935
-
7936
- # Returns the value of attribute from_section_name.
7937
- sig { returns(T.untyped) }
7938
- attr_reader :from_section_name
7939
-
7940
- # Returns the value of attribute to_workspace_name.
7941
- sig { returns(T.untyped) }
7942
- attr_reader :to_workspace_name
7943
-
7944
- # Returns the value of attribute to_project_name.
7945
- sig { returns(T.untyped) }
7946
- attr_reader :to_project_name
7947
-
7948
- # Returns the value of attribute to_section_name.
7949
- sig { returns(T.untyped) }
7950
- attr_reader :to_section_name
7951
- end
7952
-
7953
- class TestTaskSearches < ClassTest
7954
- extend Forwardable
7955
-
7956
- sig { void }
7957
- def expect_workspace_pulled; end
7958
-
7959
- sig { void }
7960
- def expect_workspace_gid_pulled; end
7961
-
7962
- sig { void }
7963
- def expect_convert_params_called; end
7964
-
7965
- sig { void }
7966
- def default_fields; end
7967
-
7968
- sig { returns(T.untyped) }
7969
- def expect_client_get_called; end
7970
-
7971
- sig { void }
7972
- def expect_search_response_queried; end
7973
-
7974
- sig { params(response_array: T.untyped).returns(T.untyped) }
7975
- def expect_response_wrapped(response_array); end
7976
-
7977
- sig { void }
7978
- def expect_tasks_filtered; end
7979
-
7980
- sig { void }
7981
- def expect_task_selector_queried; end
7982
-
7983
- sig { void }
7984
- def mock_task_search; end
7985
-
7986
- sig { void }
7987
- def projects; end
7988
-
7989
- sig { void }
7990
- def test_task_search; end
7991
-
7992
- sig { void }
7993
- def mock_task_search_overloaded; end
7994
-
7995
- sig { void }
7996
- def test_as_cache_key; end
7997
-
7998
- sig { void }
7999
- def test_raw_task_search_without_selector; end
8000
-
8001
- # _@param_ `task_searches`
8002
- sig { params(task_searches: Checkoff::TaskSearches).returns(T::Array[T.untyped]) }
8003
- def mock_full_page_raw_task_search(task_searches); end
8004
-
8005
- sig { void }
8006
- def test_raw_task_search_paginates_when_full_page; end
8007
-
8008
- sig { void }
8009
- def class_under_test; end
8010
-
8011
- sig { void }
8012
- def respond_like_instance_of; end
8013
-
8014
- sig { void }
8015
- def respond_like; end
8016
- end
8017
-
8018
- # rubocop:disable Metrics/ClassLength
8019
- class TestTaskSelectors < ClassTest
8020
- extend Forwardable
8021
-
8022
- sig { returns(Checkoff::TaskSelectors) }
8023
- def get_test_object; end
8024
-
8025
- sig { returns(Mocha::Mock) }
8026
- def task; end
8027
-
8028
- sig { void }
8029
- def test_filter_via_custom_field_gid_values_gids_no_enum_value; end
8030
-
8031
- sig { void }
8032
- def test_filter_via_custom_field_gid_values_gids_no_enum_value_multi_enum; end
8033
-
8034
- sig { void }
8035
- def test_filter_via_custom_field_gid_values_gids_no_enum_value_new_type; end
8036
-
8037
- # not sure why this would be the case, so set an alarm so I can understand
8038
- sig { void }
8039
- def test_filter_via_custom_field_custom_field_not_enabled; end
8040
-
8041
- sig { void }
8042
- def test_filter_via_custom_field_none_matched; end
8043
-
8044
- sig { void }
8045
- def test_filter_via_custom_field_gid_values_gids_custom_field_not_provided; end
8046
-
8047
- sig { void }
8048
- def test_filter_via_custom_field_gid_values_gids; end
8049
-
8050
- sig { void }
8051
- def test_filter_via_invalid_syntax; end
8052
-
8053
- sig { void }
8054
- def test_filter_via_custom_field_value_nil_false_found; end
8055
-
8056
- sig { void }
8057
- def mock_filter_via_custom_field_gid_value_gid_nil; end
8058
-
8059
- sig { void }
8060
- def test_filter_via_custom_field_gid_value_gid_nil; end
8061
-
8062
- sig { void }
8063
- def test_filter_via_custom_field_value_custom_fields_not_provided; end
8064
-
8065
- sig { void }
8066
- def test_filter_via_custom_field_value_nil_none_found; end
8067
-
8068
- sig { void }
8069
- def test_filter_via_custom_field_value_gid_nil_none_found; end
8070
-
8071
- sig { void }
8072
- def test_filter_via_task_selector_tag; end
8073
-
8074
- sig { void }
8075
- def test_filter_via_task_selector_not; end
8076
-
8077
- sig { void }
8078
- def test_filter_via_task_selector_and; end
8079
-
8080
- sig { void }
8081
- def test_filter_via_task_selector_or; end
8082
-
8083
- sig { void }
8084
- def test_filter_via_task_selector_simple; end
8085
-
8086
- sig { void }
8087
- def test_filter_via_task_selector_ready; end
8088
-
8089
- sig { void }
8090
- def expect_now_jan_1_2019; end
8091
-
8092
- sig { void }
8093
- def expect_starts_jan_1_2019_midnight; end
8094
-
8095
- sig { void }
8096
- def expect_no_incomplete_dependencies; end
8097
-
8098
- sig { returns(T.untyped) }
8099
- def mock_filter_via_task_selector_ready_between_relative_starts_no; end
8100
-
8101
- sig { void }
8102
- def test_filter_via_task_selector_ready_between_relative_starts_now; end
8103
-
8104
- sig { void }
8105
- def mock_filter_via_task_selector_ready_between_relative_starts_today; end
8106
-
8107
- sig { void }
8108
- def test_filter_via_task_selector_ready_between_relative_starts_today; end
8109
-
8110
- sig { void }
8111
- def mock_filter_via_task_selector_ready_between_relative_due_now; end
8112
-
8113
- sig { void }
8114
- def test_filter_via_task_selector_ready_between_relative_due_now; end
8115
-
8116
- sig { returns(T.untyped) }
8117
- def mock_due_on_jan_1_2019; end
8118
-
8119
- sig { void }
8120
- def expect_no_start; end
8121
-
8122
- sig { returns(T.untyped) }
8123
- def mock_filter_via_task_selector_ready_between_relative_due_today; end
8124
-
8125
- sig { returns(T.untyped) }
8126
- def test_filter_via_task_selector_ready_between_relative_due_today; end
8127
-
8128
- sig { returns(T.untyped) }
8129
- def expect_no_due; end
8130
-
8131
- sig { returns(T.untyped) }
8132
- def mock_filter_via_task_selector_ready_between_relative_no_due; end
8133
-
8134
- sig { returns(T.untyped) }
8135
- def test_filter_via_task_selector_ready_between_relative_no_due; end
8136
-
8137
- sig { returns(T.untyped) }
8138
- def expect_due_jan_1_2099; end
8139
-
8140
- sig { returns(T.untyped) }
8141
- def mock_filter_via_task_selector_ready_between_relative_due_far_future; end
8142
-
8143
- sig { returns(T.untyped) }
8144
- def test_filter_via_task_selector_ready_between_relative_due_far_future; end
8145
-
8146
- sig { returns(T.untyped) }
8147
- def expect_incomplete_dependencies; end
8148
-
8149
- sig { returns(T.untyped) }
8150
- def expect_tasks_not_mocked; end
8151
-
8152
- sig { void }
8153
- def test_filter_via_task_selector_unassigned; end
8154
-
8155
- sig { void }
8156
- def test_filter_via_custom_field_gid_value_contains_all_gids; end
8157
-
8158
- sig { void }
8159
- def test_filter_via_task_selector_due_date_set; end
8160
-
8161
- sig { void }
8162
- def test_filter_via_task_selector_custom_field_less_than_n_days_from_now; end
8163
-
8164
- sig { returns(T.untyped) }
8165
- def test_filter_via_task_selector_custom_field_less_than_n_days_from_now_not_set; end
8166
-
8167
- sig { void }
8168
- def test_filter_via_task_selector_custom_field_less_than_n_days_from_now_custom_field_not_found; end
8169
-
8170
- sig { void }
8171
- def test_filter_via_task_selector_custom_field_greater_than_or_equal_to_n_days_from_now; end
8172
-
8173
- sig { void }
8174
- def test_filter_via_task_selector_custom_field_greater_than_or_equal_to_n_days_from_now_nil; end
8175
-
8176
- sig { void }
8177
- def test_filter_via_task_selector_custom_field_greater_than_or_equal_to_n_days_from_now_custom_field_not_found; end
8178
-
8179
- sig { returns(T.untyped) }
8180
- def mock_filter_via_task_selector_modified_less_than_n_days_ago; end
8181
-
8182
- sig { void }
8183
- def test_filter_via_task_selector_modified_less_than_n_days_ago; end
8184
-
8185
- sig { void }
8186
- def test_estimate_exceeds_duration_true; end
8187
-
8188
- sig { void }
8189
- def test_estimate_exceeds_duration_false_no_estimate_set; end
8190
-
8191
- sig { void }
8192
- def test_estimate_exceeds_duration_true_only_due_set; end
8193
-
8194
- sig { void }
8195
- def test_estimate_exceeds_duration_true_no_dates_set; end
8196
-
8197
- sig { void }
8198
- def test_estimate_exceeds_duration_no_estimate_field; end
8199
-
8200
- sig { void }
8201
- def test_filter_via_task_selector_modified_less_than_n_days_ago_nil; end
8202
-
8203
- sig { void }
8204
- def test_filter_via_task_selector_modified_less_than_n_days_ago_field_not_supported; end
8205
-
8206
- sig { void }
8207
- def test_filter_via_task_selector_modified_less_than_n_days_ago_compound_field_not_supported; end
8208
-
8209
- sig { void }
8210
- def mock_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_on; end
8211
-
8212
- sig { void }
8213
- def test_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_on; end
8214
-
8215
- sig { void }
8216
- def mock_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_at; end
8217
-
8218
- sig { void }
8219
- def test_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_at; end
8220
-
8221
- sig { void }
8222
- def mock_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_nil; end
8223
-
8224
- sig { void }
8225
- def test_filter_via_task_selector_field_greater_than_or_equal_to_n_days_from_today_due_nil; end
8226
-
8227
- sig { void }
8228
- def test_filter_via_task_selector_custom_field_equal_to_date; end
8229
-
8230
- sig { void }
8231
- def test_filter_via_task_selector_custom_field_not_equal_to_date; end
8232
-
8233
- sig { void }
8234
- def test_filter_via_task_selector_last_story_created_less_than_n_days_ago_no_stories; end
8235
-
8236
- sig { void }
8237
- def mock_filter_via_task_selector_last_story_created_less_than_n_days_ago_ancient; end
8238
-
8239
- sig { void }
8240
- def test_filter_via_task_selector_last_story_created_less_than_n_days_ago_ancient; end
8241
-
8242
- sig { void }
8243
- def mock_filter_via_task_selector_last_story_created_less_than_n_days_ago_recent; end
8244
-
8245
- sig { void }
8246
- def test_filter_via_task_selector_last_story_created_less_than_n_days_ago_recent; end
8247
-
8248
- sig { returns(T.untyped) }
8249
- def test_filter_via_task_selector_in_project_named_false; end
8250
-
8251
- sig { returns(T.untyped) }
8252
- def test_filter_via_task_selector_in_project_named_true; end
8253
-
8254
- sig { returns(T.untyped) }
8255
- def test_filter_via_task_selector_in_section_named_false; end
8256
-
8257
- sig { returns(T.untyped) }
8258
- def test_filter_via_task_selector_in_section_named_true; end
8259
-
8260
- sig { returns(T.untyped) }
8261
- def test_dependent_on_previous_section_last_milestone; end
8262
-
8263
- sig { returns(T.untyped) }
8264
- def test_in_portfolio_named_true; end
8265
-
8266
- sig { returns(T.untyped) }
8267
- def test_in_portfolio_named_false; end
8268
-
8269
- sig { void }
8270
- def test_custom_field_gid_value_contains_any_gid_false_multi_enum; end
8271
-
8272
- sig { void }
8273
- def test_last_task_milestone_does_not_depend_on_this_task; end
8274
-
8275
- sig { void }
8276
- def test_in_a_real_project_true; end
8277
-
8278
- sig { void }
8279
- def test_in_a_real_project_false_only_my_tasks; end
8280
-
8281
- sig { void }
8282
- def test_section_name_starts_with_true; end
8283
-
8284
- sig { void }
8285
- def test_section_name_starts_with_false; end
8286
-
8287
- sig { void }
8288
- def test_in_section_named_true; end
8289
-
8290
- sig { void }
8291
- def test_in_section_named_false; end
8292
-
8293
- sig { void }
8294
- def test_in_portfolio_more_than_once_true; end
8295
-
8296
- sig { void }
8297
- def test_no_milestone_depends_on_this_task_true; end
8298
-
8299
- sig { void }
8300
- def respond_like_instance_of; end
8301
-
8302
- sig { void }
8303
- def respond_like; end
8304
-
8305
- sig { returns(T.class_of(Checkoff::TaskSelectors)) }
8306
- def class_under_test; end
8307
- end
8308
-
8309
- # Test the Checkoff::ViewSubcommand class used in CLI processing
8310
- class TestViewSubcommand < ClassTest
8311
- extend Forwardable
8312
-
8313
- sig { returns(String) }
8314
- def task_name; end
8315
-
8316
- sig { returns(String) }
8317
- def due_at_value; end
8318
-
8319
- sig { void }
8320
- def expect_task_lookup; end
8321
-
8322
- sig { void }
8323
- def stub_task_due_fields; end
8324
-
8325
- sig { void }
8326
- def test_run_on_task; end
8327
-
8328
- sig { void }
8329
- def test_run_on_task_not_found; end
8330
-
8331
- sig { params(clazz: T.untyped).returns(Checkoff::ViewSubcommand) }
8332
- def create_object(clazz = class_under_test); end
8333
-
8334
- sig { returns(T.class_of(Checkoff::ViewSubcommand)) }
8335
- def class_under_test; end
8336
-
8337
- sig { void }
8338
- def respond_like_instance_of; end
8339
-
8340
- sig { void }
8341
- def respond_like; end
8342
- end
8343
-
8344
- class TestLogging < Minitest::Test
8345
- sig { void }
8346
- def test_logger_defaults_without_rails; end
8347
-
8348
- sig { void }
8349
- def test_logger_uses_rails_logger_when_available; end
8350
-
8351
- sig { void }
8352
- def test_logger_falls_back_when_rails_has_no_logger; end
8353
-
8354
- sig { void }
8355
- def build_logger_owner; end
8356
-
8357
- sig { void }
8358
- def with_removed_rails; end
8359
-
8360
- sig { params(rails_const: T.untyped).void }
8361
- def with_temporary_rails(rails_const); end
8362
- end
8363
-
8364
- class TestProjectSelectors < ClassTest
8365
- extend Forwardable
8366
-
8367
- sig { returns(Checkoff::ProjectSelectors) }
8368
- def get_test_object; end
8369
-
8370
- sig { void }
8371
- def test_filter_via_custom_field_value_contain_any_value_false; end
8372
-
8373
- sig { void }
8374
- def test_filter_via_custom_field_values_contain_any_value_true; end
8375
-
8376
- sig { void }
8377
- def test_filter_via_custom_field_values_contain_any_value_true_single_in_multi_enum; end
8378
-
8379
- sig { void }
8380
- def test_filter_via_custom_field_values_contain_any_value_true_multiple; end
8381
-
8382
- sig { void }
8383
- def test_filter_via_custom_field_values_contain_any_value_false_nothing_set; end
8384
-
8385
- sig { void }
8386
- def test_filter_via_custom_field_value_contains_any_value_no_custom_field_false; end
8387
-
8388
- sig { void }
8389
- def test_filter_via_due_date_false; end
8390
-
8391
- sig { void }
8392
- def test_filter_via_ready_false; end
8393
-
8394
- sig { void }
8395
- def test_bogus_raises; end
8396
-
8397
- sig { returns(T.class_of(Checkoff::ProjectSelectors)) }
8398
- def class_under_test; end
8399
-
8400
- sig { void }
8401
- def respond_like_instance_of; end
8402
-
8403
- sig { void }
8404
- def respond_like; end
8405
- end
8406
-
8407
- class TestSectionSelectors < ClassTest
8408
- extend Forwardable
8409
-
8410
- sig { returns(Checkoff::SectionSelectors) }
8411
- def get_test_object; end
8412
-
8413
- sig { void }
8414
- def test_filter_via_ends_with_milestone_empty; end
8415
-
8416
- sig { void }
8417
- def expect_client_tasks_pulled; end
8418
-
8419
- sig { void }
8420
- def expect_section_gid_pulled; end
8421
-
8422
- sig { void }
8423
- def mock_filter_via_ends_with_milestone_true; end
8424
-
8425
- sig { void }
8426
- def test_filter_via_ends_with_milestone_true; end
8427
-
8428
- sig { void }
8429
- def test_bogus_raises; end
8430
-
8431
- sig { void }
8432
- def test_filter_via_has_tasks_false; end
8433
-
8434
- sig { returns(T.class_of(Checkoff::SectionSelectors)) }
8435
- def class_under_test; end
8436
- end
8437
-
8438
- class TestTaskHashes < ClassTest
8439
- MEMBER_OF_SECTION_A_IN_PROJECT_1 = T.let({
8440
- 'section' => {
8441
- 'gid' => 'section_a_gid',
8442
- 'name' => 'section_a_name',
8443
- },
8444
- 'project' => {
8445
- 'gid' => 'project_1_gid',
8446
- 'name' => 'project_1_name',
8447
- },
8448
- }.freeze, T.untyped)
8449
- TASK_A_RAW_HASH = T.let({
8450
- 'name' => 'a',
8451
- 'custom_fields' => [
8452
- {
8453
- 'name' => 'custom_field_x',
8454
- 'display_value' => 'foo',
8455
- },
8456
- ],
8457
- 'memberships' => [
8458
- MEMBER_OF_SECTION_A_IN_PROJECT_1,
8459
- ],
8460
- }.freeze, T.untyped)
8461
- TASK_A_HASH = T.let({
8462
- 'name' => 'a',
8463
- 'task' => 'a',
8464
- 'custom_fields' => [
8465
- { 'name' => 'custom_field_x', 'display_value' => 'foo' },
8466
- ],
8467
- 'memberships' => [
8468
- MEMBER_OF_SECTION_A_IN_PROJECT_1,
8469
- ],
8470
- 'unwrapped' => {
8471
- 'custom_fields' => {
8472
- 'custom_field_x' => {
8473
- 'name' => 'custom_field_x',
8474
- 'display_value' => 'foo',
8475
- },
8476
- },
8477
- 'membership_by_section_gid' => {
8478
- 'section_a_gid' => MEMBER_OF_SECTION_A_IN_PROJECT_1,
8479
- },
8480
- 'membership_by_section_name' => {
8481
- 'section_a_name' => MEMBER_OF_SECTION_A_IN_PROJECT_1,
8482
- },
8483
- 'membership_by_project_gid' => {
8484
- 'project_1_gid' => MEMBER_OF_SECTION_A_IN_PROJECT_1,
8485
- },
8486
- 'membership_by_project_name' => {
8487
- 'project_1_name' => MEMBER_OF_SECTION_A_IN_PROJECT_1,
8488
- },
8489
- },
8490
- }.freeze, T.untyped)
8491
- TASK_B_RAW_HASH = T.let({
8492
- 'name' => 'b',
8493
- 'custom_fields' => [
8494
- {
8495
- 'name' => 'custom_field_x',
8496
- 'display_value' => 'bar',
8497
- },
8498
- ],
8499
- }.freeze, T.untyped)
8500
- TASK_B_HASH = T.let({
8501
- 'name' => 'b',
8502
- 'task' => 'b',
8503
- 'custom_fields' => [
8504
- { 'name' => 'custom_field_x', 'display_value' => 'bar' },
8505
- ],
8506
- 'unwrapped' => {
8507
- 'custom_fields' => {
8508
- 'custom_field_x' => { 'name' => 'custom_field_x', 'display_value' => 'bar' },
8509
- },
8510
- 'membership_by_section_gid' => {},
8511
- 'membership_by_section_name' => {},
8512
- 'membership_by_project_gid' => {},
8513
- 'membership_by_project_name' => {},
8514
- },
8515
- }.freeze, T.untyped)
8516
-
8517
- sig { void }
8518
- def test_task_a_to_h; end
8519
-
8520
- sig { void }
8521
- def test_task_b_to_h; end
8522
-
8523
- sig { void }
8524
- def class_under_test; end
8525
- end
8526
-
8527
- class TestTaskTiming < ClassTest
8528
- sig { void }
8529
- def test_date_or_time_field_by_name_raises_if_unknown_field; end
8530
-
8531
- sig { void }
8532
- def class_under_test; end
8533
-
8534
- sig { void }
8535
- def respond_like_instance_of; end
8536
-
8537
- sig { void }
8538
- def respond_like; end
8539
- end
8540
-
8541
- # Test the Checkoff::Internal::ConfigLoader class
8542
- class TestConfigLoader < Minitest::Test
8543
- sig { void }
8544
- def mock_yaml_loaded; end
8545
-
8546
- sig { void }
8547
- def test_requests_from_env_variable_neither_populated; end
8548
-
8549
- sig { void }
8550
- def test_requests_from_env_variable_if_yaml_not_populated; end
8551
-
8552
- sig { void }
8553
- def test_defers_to_yaml; end
8554
- end
8555
-
8556
- class TestProjectHashes < ClassTest
8557
- PROJECT_A_RAW_HASH = T.let({
8558
- 'name' => 'a',
8559
- 'custom_fields' => [
8560
- {
8561
- 'name' => 'custom_field_x',
8562
- 'display_value' => 'foo',
8563
- },
8564
- ],
8565
- }.freeze, T.untyped)
8566
- PROJECT_A_HASH = T.let({
8567
- 'name' => 'a',
8568
- 'project' => 'a',
8569
- 'custom_fields' => [
8570
- { 'name' => 'custom_field_x', 'display_value' => 'foo' },
8571
- ],
8572
- 'unwrapped' => {
8573
- 'custom_fields' => {
8574
- 'custom_field_x' => {
8575
- 'name' => 'custom_field_x',
8576
- 'display_value' => 'foo',
8577
- },
8578
- },
8579
- },
8580
- }.freeze, T.untyped)
8581
- PROJECT_B_RAW_HASH = T.let({
8582
- 'name' => 'b',
8583
- 'custom_fields' => [
8584
- {
8585
- 'name' => 'custom_field_x',
8586
- 'display_value' => 'bar',
8587
- },
8588
- ],
8589
- }.freeze, T.untyped)
8590
- PROJECT_B_HASH = T.let({
8591
- 'name' => 'b',
8592
- 'project' => 'b',
8593
- 'custom_fields' => [
8594
- { 'name' => 'custom_field_x', 'display_value' => 'bar' },
8595
- ],
8596
- 'unwrapped' => {
8597
- 'custom_fields' => {
8598
- 'custom_field_x' => { 'name' => 'custom_field_x', 'display_value' => 'bar' },
8599
- },
8600
- },
8601
- }.freeze, T.untyped)
8602
-
8603
- sig { void }
8604
- def test_project_a_to_h; end
8605
-
8606
- sig { void }
8607
- def test_project_b_to_h; end
8608
-
8609
- sig { void }
8610
- def test_project_b_to_h_named; end
8611
-
8612
- sig { void }
8613
- def class_under_test; end
8614
- end
8615
-
8616
- class TestProjectTiming < ClassTest
8617
- extend Forwardable
8618
-
8619
- sig { void }
8620
- def test_date_or_time_field_by_name_due; end
8621
-
8622
- sig { void }
8623
- def test_date_or_time_field_by_name_due_nil; end
8624
-
8625
- sig { returns(T.untyped) }
8626
- def test_date_or_time_field_by_name_start; end
8627
-
8628
- sig { void }
8629
- def test_date_or_time_field_by_name_start_nil; end
8630
-
8631
- sig { void }
8632
- def test_date_or_time_field_by_name_ready; end
8633
-
8634
- sig { void }
8635
- def test_date_or_time_field_by_name_custom_field; end
8636
-
8637
- sig { void }
8638
- def test_date_or_time_field_by_name_custom_field_nil; end
8639
-
8640
- sig { void }
8641
- def test_date_or_time_field_by_name_raises_if_unknown_field; end
8642
-
8643
- sig { void }
8644
- def test_date_or_time_field_by_name_raises_if_unknown_array_field; end
8645
-
8646
- sig { void }
8647
- def class_under_test; end
8648
-
8649
- sig { void }
8650
- def respond_like_instance_of; end
8651
-
8652
- sig { void }
8653
- def respond_like; end
8654
- end
8655
-
8656
- # rubocop:disable Metrics/ClassLength
8657
- class TestSearchUrlParser < ClassTest
8658
- sig { returns(Checkoff::Internal::SearchUrl::Parser) }
8659
- def get_test_object; end
8660
-
8661
- # Ruby 3.4+ Hash#inspect inserts spaces around =>; normalize for assertions.
8662
- #
8663
- # _@param_ `message`
8664
- sig { params(message: String).returns(String) }
8665
- def normalize_error_message(message); end
8666
-
8667
- sig { void }
8668
- def test_convert_params_1; end
8669
-
8670
- sig { void }
8671
- def test_convert_params_2; end
8672
-
8673
- sig { void }
8674
- def test_convert_params_3; end
8675
-
8676
- sig { void }
8677
- def test_convert_params_4; end
8678
-
8679
- sig { void }
8680
- def test_convert_params_5; end
8681
-
8682
- sig { void }
8683
- def test_convert_params_6; end
8684
-
8685
- sig { void }
8686
- def test_convert_params_7; end
8687
-
8688
- sig { void }
8689
- def test_convert_params_8; end
8690
-
8691
- sig { void }
8692
- def test_convert_params_9; end
8693
-
8694
- sig { void }
8695
- def test_convert_params_10; end
8696
-
8697
- sig { void }
8698
- def test_convert_params_11; end
8699
-
8700
- sig { void }
8701
- def test_convert_params_12; end
8702
-
8703
- sig { void }
8704
- def test_convert_params_13; end
8705
-
8706
- sig { void }
8707
- def test_convert_params_14; end
8708
-
8709
- sig { void }
8710
- def test_convert_params_15; end
8711
-
8712
- sig { void }
8713
- def test_convert_params_16; end
8714
-
8715
- sig { void }
8716
- def test_convert_params_17; end
8717
-
8718
- sig { void }
8719
- def test_convert_params_18; end
8720
-
8721
- sig { void }
8722
- def test_convert_params_19; end
8723
-
8724
- sig { void }
8725
- def test_convert_params_20; end
8726
-
8727
- sig { void }
8728
- def test_convert_params_21; end
8729
-
8730
- sig { void }
8731
- def test_convert_params_22; end
8732
-
8733
- sig { void }
8734
- def test_convert_params_23; end
8735
-
8736
- sig { void }
8737
- def test_convert_params_24; end
8738
-
8739
- sig { void }
8740
- def test_convert_params_25; end
8741
-
8742
- sig { void }
8743
- def test_convert_params_26; end
8744
-
8745
- sig { void }
8746
- def test_convert_params_27; end
8747
-
8748
- sig { void }
8749
- def test_convert_params_28; end
8750
-
8751
- sig { void }
8752
- def test_convert_params_29; end
8753
-
8754
- sig { void }
8755
- def test_convert_params_30; end
8756
-
8757
- sig { void }
8758
- def test_convert_params_31; end
8759
-
8760
- sig { void }
8761
- def test_convert_params_32; end
8762
-
8763
- sig { void }
8764
- def test_convert_params_33; end
8765
-
8766
- sig { void }
8767
- def test_convert_params_34; end
8768
-
8769
- sig { void }
8770
- def test_convert_params_35; end
8771
-
8772
- sig { void }
8773
- def test_convert_params_36; end
8774
-
8775
- sig { void }
8776
- def test_convert_params_37; end
8777
-
8778
- sig { void }
8779
- def test_convert_params_38; end
8780
-
8781
- sig { void }
8782
- def test_convert_params_39; end
8783
-
8784
- sig { void }
8785
- def test_convert_params_40; end
8786
-
8787
- sig { void }
8788
- def test_convert_params_41; end
8789
-
8790
- sig { void }
8791
- def test_convert_params_42; end
8792
-
8793
- sig { void }
8794
- def test_convert_params_43; end
8795
-
8796
- sig { void }
8797
- def test_convert_params_44; end
8798
-
8799
- sig { void }
8800
- def test_convert_params_45; end
8801
-
8802
- sig { void }
8803
- def test_convert_params_46; end
8804
-
8805
- sig { void }
8806
- def test_convert_params_47; end
8807
-
8808
- sig { void }
8809
- def test_convert_params_48; end
8810
-
8811
- sig { returns(T.class_of(Checkoff::Internal::SearchUrl::Parser)) }
8812
- def class_under_test; end
8813
- end
8814
-
8815
- class TestAsanaEventFilter < ClassTest
8816
- extend Forwardable
8817
- TASK_NAME_CHANGED_EVENT = T.let({
8818
- 'action' => 'changed',
8819
- 'created_at' => '2024-01-16T20:10:27.783Z',
8820
- 'change' => {
8821
- 'field' => 'name',
8822
- 'action' => 'changed',
8823
- },
8824
- 'resource' => {
8825
- 'gid' => '456',
8826
- 'resource_type' => 'task',
8827
- 'resource_subtype' => 'default_task',
8828
- },
8829
- 'user' => {
8830
- 'gid' => '123',
8831
- 'resource_type' => 'user',
8832
- },
8833
- }.freeze, T.untyped)
8834
- CUSTOM_FIELD_CHANGED_EVENT = T.let({
8835
- 'action' => 'changed',
8836
- 'created_at' => '2023-11-23T18:00:00.271Z',
8837
- 'change' => {
8838
- 'field' => 'custom_fields',
8839
- 'action' => 'changed',
8840
- 'new_value' => {
8841
- 'gid' => '12',
8842
- 'resource_type' => 'custom_field',
8843
- 'resource_subtype' => 'enum',
8844
- 'enum_value' => {
8845
- 'gid' => '34',
8846
- 'resource_type' => 'enum_option',
8847
- },
8848
- },
8849
- },
8850
- 'resource' => {
8851
- 'gid' => '56',
8852
- 'resource_type' => 'task',
8853
- 'resource_subtype' => 'default_task',
8854
- },
8855
- 'user' => {
8856
- 'gid' => '78',
8857
- 'resource_type' => 'user',
8858
- },
8859
- }.freeze, T.untyped)
8860
- TASK_REMOVED_FROM_SECTION_EVENT = T.let({
8861
- 'action' => 'removed',
8862
- 'created_at' => '2023-11-22T21:42:14.029Z',
8863
- 'parent' => {
8864
- 'gid' => '90',
8865
- 'resource_type' => 'section',
8866
- },
8867
- 'resource' => {
8868
- 'gid' => '1',
8869
- 'resource_type' => 'task',
8870
- 'resource_subtype' => 'default_task',
8871
- },
8872
- 'user' => {
8873
- 'gid' => '78',
8874
- 'resource_type' => 'user',
8875
- },
8876
- }.freeze, T.untyped)
8877
- TASK_COMPLETED_EVENT = T.let({
8878
- 'user' => {
8879
- 'gid' => '123',
8880
- 'resource_type' => 'user',
8881
- },
8882
- 'created_at' => '2024-01-13T20:51:41.806Z',
8883
- 'action' => 'changed',
8884
- 'resource' => {
8885
- 'gid' => '456',
8886
- 'resource_type' => 'task',
8887
- 'resource_subtype' => 'default_task',
8888
- },
8889
- 'parent' => nil,
8890
- 'change' => { 'field' => 'completed', 'action' => 'changed' },
8891
- }.freeze, T.untyped)
8892
- TASK_COMPLETED_EVENT_2 = T.let({
8893
- 'user' => {
8894
- 'gid' => '123',
8895
- 'resource_type' => 'user',
8896
- },
8897
- 'created_at' => '2024-01-15T12:34:45.332Z',
8898
- 'action' => 'changed',
8899
- 'resource' => {
8900
- 'gid' => '456',
8901
- 'resource_type' => 'task',
8902
- 'resource_subtype' => 'default_task',
8903
- },
8904
- 'change' => {
8905
- 'field' => 'completed',
8906
- 'action' => 'changed',
8907
- },
8908
- }.freeze, T.untyped)
8909
-
8910
- sig { void }
8911
- def test_matches_nil_filters_true; end
8912
-
8913
- sig { void }
8914
- def test_matches_zero_filters_false; end
8915
-
8916
- sig { void }
8917
- def test_matches_on_resource_type_true; end
8918
-
8919
- sig { void }
8920
- def test_matches_on_resource_subtype_true; end
8921
-
8922
- sig { void }
8923
- def test_matches_on_action_true; end
8924
-
8925
- sig { returns(T.untyped) }
8926
- def test_matches_on_action_false; end
8927
-
8928
- sig { void }
8929
- def test_fetched_section_gid; end
8930
-
8931
- sig { void }
8932
- def test_matches_on_fields_true; end
8933
-
8934
- sig { params(gid: T.untyped, fields: T.untyped, task_obj: T.untyped).void }
8935
- def expect_task_fetched(gid, fields, task_obj); end
8936
-
8937
- sig { void }
8938
- def test_task_completed_event_true; end
8939
-
8940
- sig { void }
8941
- def test_matches_on_parent_gid_true; end
8942
-
8943
- sig { void }
8944
- def test_matches_on_bad_key_raises; end
8945
-
8946
- sig { void }
8947
- def class_under_test; end
8948
-
8949
- sig { void }
8950
- def respond_like_instance_of; end
8951
-
8952
- sig { void }
8953
- def respond_like; end
8954
- end
8955
-
8956
- class TestPruneCheckoffRbiTestConstants < Minitest::Test
8957
- SAMPLE = T.let(<<~RBI, T.untyped)
8958
- module TestDate
8959
- TIME_BY_PERIOD = T.let({ a: '1' }.freeze, T.untyped)
8960
- end
8961
-
8962
- class TestTasks < BaseAsana
8963
- extend Forwardable
8964
- TIME_BY_PERIOD = T.let({
8965
- two_am: '02:00:20',
8966
- }.freeze, T.untyped)
8967
-
8968
- sig { void }
8969
- def foo; end
8970
- end
8971
- RBI
8972
-
8973
- sig { returns(T.untyped) }
8974
- def test_prunes_subclass_constant; end
8975
-
8976
- sig { returns(T.untyped) }
8977
- def test_noop_when_nothing_to_prune; end
8978
- end