File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1- ## HEAD
2-
3- ## Minor Enhancements
4-
5- * Disable network related features if the env var ` PAGES_DISABLE_NETWORK ` is set
6-
71## 2.16.1 / 2023-12-22
82
93### Bug Fixes
Original file line number Diff line number Diff line change 3838 subject . contributors ( "jekyll/github-metadata" )
3939 end . to raise_error ( described_class ::BadCredentialsError )
4040 end
41+
42+ before { ENV [ "PAGES_DISABLE_NETWORK" ] = nil }
43+
44+ it "supresses network accesses if requested" do
45+ WebMock . disable_net_connect!
46+
47+ ENV [ "PAGES_DISABLE_NETWORK" ] = "1"
48+ expect ( subject . contributors ( "jekyll/github-metadata" ) ) . to be ( false )
49+ end
50+
51+ it "allows network accesses by default" do
52+ WebMock . disable_net_connect!
53+
54+ expect do
55+ subject . contributors ( "jekyll/github-metadata" )
56+ end . to raise_error ( WebMock ::NetConnectNotAllowedError )
57+ end
4158end
You can’t perform that action at this time.
0 commit comments