File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
spec/v3/services/preferences Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module Travis::API::V3
4
4
class Models ::OrganizationPreferences < Models ::JsonSlice
5
5
child Models ::Preference
6
6
7
- attribute :consume_oss_credits , Boolean , default : false
7
+ attribute :consume_oss_credits , Boolean , default : true
8
8
9
9
# whether to show insights about the organization's private repositories to
10
10
# only admins, all members of the organization, or everybody (public) (note:
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Models::UserPreferences < Models::JsonSlice
6
6
7
7
attribute :build_emails , Boolean , default : true
8
8
9
- attribute :consume_oss_credits , Boolean , default : false
9
+ attribute :consume_oss_credits , Boolean , default : true
10
10
11
11
# whether to show insights about the user's private repositories to
12
12
# everybody or keep them only for the user (note: insights about public
Original file line number Diff line number Diff line change 50
50
"@href" => "/v3/org/#{ organization . id } /preference/consume_oss_credits" ,
51
51
"@representation" => "standard" ,
52
52
"name" => "consume_oss_credits" ,
53
- "value" => false
53
+ "value" => true
54
54
} , {
55
55
"@type" => "preference" ,
56
56
"@href" => "/v3/org/#{ organization . id } /preference/private_insights_visibility" ,
66
66
describe 'some preference has been set' do
67
67
before do
68
68
organization . preferences . update ( :private_insights_visibility , 'members' )
69
- organization . preferences . update ( :consume_oss_credits , true )
69
+ organization . preferences . update ( :consume_oss_credits , false )
70
70
end
71
71
72
72
it 'returns the set value merged with the defaults' do
80
80
"@href" => "/v3/org/#{ organization . id } /preference/consume_oss_credits" ,
81
81
"@representation" => "standard" ,
82
82
"name" => "consume_oss_credits" ,
83
- "value" => true
83
+ "value" => false
84
84
} , {
85
85
"@type" => "preference" ,
86
86
"@href" => "/v3/org/#{ organization . id } /preference/private_insights_visibility" ,
Original file line number Diff line number Diff line change 31
31
"@href" => "/v3/preference/consume_oss_credits" ,
32
32
"@representation" => "standard" ,
33
33
"name" => "consume_oss_credits" ,
34
- "value" => false
34
+ "value" => true
35
35
} , {
36
36
"@type" => "preference" ,
37
37
"@href" => "/v3/preference/private_insights_visibility" ,
47
47
describe 'authenticated, user has prefs' do
48
48
before do
49
49
user . preferences . update ( :build_emails , false )
50
- user . preferences . update ( :consume_oss_credits , true )
50
+ user . preferences . update ( :consume_oss_credits , false )
51
51
user . preferences . update ( :private_insights_visibility , 'public' )
52
52
get ( "/v3/preferences" , { } , auth_headers )
53
53
end
71
71
"@href" => "/v3/preference/consume_oss_credits" ,
72
72
"@representation" => "standard" ,
73
73
"name" => "consume_oss_credits" ,
74
- "value" => true
74
+ "value" => false
75
75
} , {
76
76
"@type" => "preference" ,
77
77
"@href" => "/v3/preference/private_insights_visibility" ,
You can’t perform that action at this time.
0 commit comments