spec/ezmlm/list_spec.rb
author Mahlon E. Smith <mahlon@laika.com>
Mon, 06 Feb 2017 11:54:16 -0800
changeset 14 cba9fb39bcdb
parent 12 3cc813140c80
child 15 a38e6916504c
permissions -rw-r--r--
Checkpoint commit. - Add the majority of the list behavioral knobs. - Add some quick helpers that can make list changes safely (write, unlink, touch) - Fix tests.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     1
#!/usr/bin/env ruby
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     2
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     3
BEGIN {
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     4
	require 'pathname'
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     5
	basedir = Pathname.new( __FILE__ ).dirname.parent.parent
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     6
	libdir = basedir + "lib"
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     7
	$LOAD_PATH.unshift( libdir ) unless $LOAD_PATH.include?( libdir )
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     8
}
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
     9
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    10
require_relative '../spec_helpers'
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    11
require 'ezmlm'
1
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    12
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    13
describe Ezmlm::List do
1d3cfd4837a8 Filled out the project, added Ezmlm module + spec.
Michael Granger <mgranger@laika.com>
parents:
diff changeset
    14
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    15
	before( :each ) do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    16
		@listdir = make_listdir()
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    17
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    18
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    19
	after( :each ) do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    20
		rm_r( @listdir )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    21
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    22
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    23
	let( :list ) do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    24
		described_class.new( @listdir )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    25
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    26
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
    27
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    28
	it "can return the list name" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    29
		expect( list.name ).to eq( TEST_LIST_NAME )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    30
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
    31
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    32
	it "can return the list host" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    33
		expect( list.host ).to eq( TEST_LIST_HOST )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    34
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    35
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    36
	it "can return the list address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    37
		expect( list.address ).to eq( TEST_LIST_NAME + '@' + TEST_LIST_HOST )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    38
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    39
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    40
	it "returns nil if the list owner isn't an email address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    41
		expect( list.owner ).to eq( nil )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    42
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    43
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    44
	it "can return an email address owner" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    45
		expect( list ).to receive( :read ).with( 'owner' ).and_return( TEST_OWNER )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    46
		expect( list.owner ).to eq( TEST_OWNER )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    47
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    48
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    49
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    50
	it "can add a new subscriber" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    51
		list.add_subscriber( *TEST_SUBSCRIBERS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    52
		expect( list.is_subscriber?( TEST_SUBSCRIBERS.first ) ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    53
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    54
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    55
	it "can return the list of subscibers" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    56
		list.add_subscriber( *TEST_SUBSCRIBERS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    57
		list.add_subscriber( 'notanemailaddress' )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    58
		expect( list.subscribers.length ).to eq( 3 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    59
		expect( list.subscribers ).to include( TEST_SUBSCRIBERS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    60
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    61
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    62
	it "can remove a current subscriber" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    63
		list.add_subscriber( *TEST_SUBSCRIBERS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    64
		list.remove_subscriber( 'notanemailaddress' )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    65
		list.remove_subscriber( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    66
		expect( list.subscribers.length ).to eq( 2 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    67
	end
5
804e1c2b9a40 * Added rdoc-generation to the cruise task and the artifacts that get saved
Michael Granger <mgranger@laika.com>
parents: 4
diff changeset
    68
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    69
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    70
	it "can add a new moderator" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    71
		list.add_moderator( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    72
		expect( list.is_moderator?( TEST_MODERATORS.first ) ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    73
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    74
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    75
	it "can return the list of moderators" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    76
		list.add_moderator( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    77
		expect( list.moderators.length ).to eq( 1 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    78
		expect( list.moderators ).to include( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    79
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    80
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    81
	it "can remove a current moderator" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    82
		list.add_moderator( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    83
		list.remove_moderator( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    84
		expect( list.moderators ).to be_empty
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    85
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
    86
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
    87
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    88
	it "can add a blacklisted address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    89
		list.add_blacklisted( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    90
		expect( list.is_blacklisted?( TEST_MODERATORS.first ) ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    91
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
    92
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    93
	it "can return the list of blacklisted addresses" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    94
		list.add_blacklisted( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    95
		expect( list.blacklisted.length ).to eq( 1 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    96
		expect( list.blacklisted ).to include( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    97
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
    98
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
    99
	it "can remove a blacklisted address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   100
		list.add_blacklisted( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   101
		list.remove_blacklisted( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   102
		expect( list.blacklisted ).to be_empty
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   103
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   104
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   105
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   106
	it "can add an allowed address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   107
		list.add_allowed( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   108
		expect( list.is_allowed?( TEST_MODERATORS.first ) ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   109
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   110
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   111
	it "can return the list of allowed addresses" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   112
		list.add_allowed( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   113
		expect( list.allowed.length ).to eq( 1 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   114
		expect( list.allowed ).to include( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   115
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   116
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   117
	it "can remove a allowed address" do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   118
		list.add_allowed( *TEST_MODERATORS )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   119
		list.remove_allowed( TEST_MODERATORS.first )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   120
		expect( list.allowed ).to be_empty
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   121
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   122
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   123
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   124
	it 'can return the current threading state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   125
		expect( list.threaded? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   126
	end
3
9b9e85ccf4f9 Add a test for a customized moderator's directory in the dir/remote file.
Michael Granger <mgranger@laika.com>
parents: 2
diff changeset
   127
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   128
	it 'can set the threading state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   129
		list.threaded = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   130
		expect( list.threaded? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   131
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   132
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   133
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   134
	it 'can return the current public/private state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   135
		expect( list.public? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   136
		expect( list.private? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   137
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   138
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   139
	it 'can set the privacy state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   140
		list.public = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   141
		expect( list.public? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   142
		expect( list.private? ).to be_truthy
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   143
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   144
		list.private = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   145
		expect( list.private? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   146
		expect( list.public? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   147
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   148
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   149
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   150
	it 'can set the remote subscription state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   151
		expect( list.remote_subscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   152
		list.remote_subscriptions = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   153
		expect( list.remote_subscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   154
		list.remote_subscriptions = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   155
		expect( list.remote_subscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   156
	end
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   157
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   158
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   159
	it 'can set subscription moderation state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   160
		expect( list.moderated_subscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   161
		list.moderated_subscriptions = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   162
		expect( list.moderated_subscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   163
		list.moderated_subscriptions = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   164
		expect( list.moderated_subscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   165
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   166
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   167
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   168
	it 'can set posting moderation state' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   169
		expect( list.moderated? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   170
		list.moderated = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   171
		expect( list.moderated? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   172
		list.moderated = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   173
		expect( list.moderated? ).to be_falsey
2
7b5a0131d5cd Added more list-config accessors
Michael Granger <mgranger@laika.com>
parents: 1
diff changeset
   174
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   175
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   176
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   177
	it 'can set moderation-only posting' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   178
		expect( list.moderator_posts_only? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   179
		list.moderator_posts_only = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   180
		expect( list.moderator_posts_only? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   181
		list.moderator_posts_only = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   182
		expect( list.moderator_posts_only? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   183
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   184
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   185
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   186
	it 'can set user-only posting' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   187
		expect( list.user_posts_only? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   188
		list.user_posts_only = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   189
		expect( list.user_posts_only? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   190
		list.user_posts_only = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   191
		expect( list.user_posts_only? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   192
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   193
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   194
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   195
	it 'user+moderation together sets non-subscriber moderation' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   196
		expect( list.user_posts_only? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   197
		expect( list.moderated? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   198
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   199
		list.moderated = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   200
		list.user_posts_only = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   201
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   202
		expect( list.listdir + 'noreturnposts' ).to exist
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   203
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   204
		list.moderated = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   205
		expect( list.listdir + 'noreturnposts' ).to_not exist
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   206
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   207
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   208
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   209
	it 'can set archival status' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   210
		expect( list.archived? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   211
		list.archive = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   212
		expect( list.archived? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   213
		list.archive = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   214
		expect( list.archived? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   215
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   216
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   217
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   218
	it 'can limit archive access to moderators only' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   219
		expect( list.private_archive? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   220
		list.private_archive = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   221
		expect( list.private_archive? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   222
		list.private_archive = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   223
		expect( list.private_archive? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   224
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   225
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   226
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   227
	it 'can limit archive access to list subscribers only' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   228
		expect( list.guarded_archive? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   229
		list.guarded_archive = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   230
		expect( list.guarded_archive? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   231
		list.guarded_archive = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   232
		expect( list.guarded_archive? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   233
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   234
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   235
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   236
	it 'can toggle digest status' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   237
		expect( list.digested? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   238
		list.digest = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   239
		expect( list.digested? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   240
		list.digest = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   241
		expect( list.digested? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   242
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   243
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   244
	it 'returns a default digest kbyte size' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   245
		expect( list.digest_kbytesize ).to eq( 64 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   246
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   247
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   248
	it 'can set a new digest kbyte size' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   249
		list.digest_kbytesize = 300
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   250
		expect( list.digest_kbytesize ).to eq( 300 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   251
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   252
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   253
	it 'returns a default digest message count' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   254
		expect( list.digest_count ).to eq( 10 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   255
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   256
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   257
	it 'can set a new digest message count' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   258
		list.digest_count = 25
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   259
		expect( list.digest_count ).to eq( 25 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   260
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   261
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   262
	it 'returns a default digest timeout' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   263
		expect( list.digest_timeout ).to eq( 48 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   264
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   265
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   266
	it 'can set a new digest timeout' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   267
		list.digest_timeout = 24
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   268
		expect( list.digest_timeout ).to eq( 24 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   269
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   270
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   271
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   272
	it 'can set subscription confirmation' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   273
		expect( list.confirm_subscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   274
		list.confirm_subscriptions = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   275
		expect( list.confirm_subscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   276
		list.confirm_subscriptions = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   277
		expect( list.confirm_subscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   278
	end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   279
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   280
	it 'can set unsubscription confirmation' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   281
		expect( list.confirm_unsubscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   282
		list.confirm_unsubscriptions = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   283
		expect( list.confirm_unsubscriptions? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   284
		list.confirm_unsubscriptions = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   285
		expect( list.confirm_unsubscriptions? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   286
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   287
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   288
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   289
	it 'can set message posting confirmation' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   290
		expect( list.confirm_postings? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   291
		list.confirm_postings = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   292
		expect( list.confirm_postings? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   293
		list.confirm_postings = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   294
		expect( list.confirm_postings? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   295
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   296
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   297
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   298
	it 'can toggle remote subscriber lists for moderators' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   299
		expect( list.allow_remote_listing? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   300
		list.allow_remote_listing = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   301
		expect( list.allow_remote_listing? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   302
		list.allow_remote_listing = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   303
		expect( list.allow_remote_listing? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   304
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   305
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   306
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   307
	it 'can toggle bounce management' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   308
		expect( list.bounce_warnings? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   309
		list.bounce_warnings = false
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   310
		expect( list.bounce_warnings? ).to be_falsey
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   311
		list.bounce_warnings = true
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   312
		expect( list.bounce_warnings? ).to be_truthy
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   313
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   314
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   315
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   316
	it 'returns a default max message size' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   317
		expect( list.maximum_message_size ).to eq( 0 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   318
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   319
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   320
	it 'can set a new max message size' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   321
		list.maximum_message_size = 1024 * 300
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   322
		expect( list.maximum_message_size ).to eq( 307200 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   323
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   324
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   325
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   326
	it 'can return the message count for a pristine list' do
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   327
		expect( list.message_count ).to eq( 0 )
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   328
	end
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   329
end
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   330
4
8c4ae0797d5f Added more archive-related functions:
Michael Granger <mgranger@laika.com>
parents: 3
diff changeset
   331
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   332
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   333
	# it "can fetch the body of an archived post by message id"
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   334
	# it "can fetch the header of an archived post by message id"
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   335
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   336
	# it "can return a hash of the subjects of all archived posts to message ids"
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   337
	# it "can return an Array of the subjects of all archived posts"
4
8c4ae0797d5f Added more archive-related functions:
Michael Granger <mgranger@laika.com>
parents: 3
diff changeset
   338
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   339
	# it "can return a hash of the threads of all archived posts to message ids"
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   340
	# it "can return an Array of the threads of all archived posts"
4
8c4ae0797d5f Added more archive-related functions:
Michael Granger <mgranger@laika.com>
parents: 3
diff changeset
   341
14
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   342
	# it "can return a hash of the authors of all archived posts to message ids"
cba9fb39bcdb Checkpoint commit.
Mahlon E. Smith <mahlon@laika.com>
parents: 12
diff changeset
   343
	# it "can return an Array of the authors of all archived posts"
12
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   344
3cc813140c80 First round of modernizing after a long absence.
Mahlon E. Smith <mahlon@martini.nu>
parents: 6
diff changeset
   345