Skip to content

Commit 97a8c1c

Browse files
committed
Cleanup
1 parent 522f131 commit 97a8c1c

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

spec/errbit_github_plugin/issue_tracker_spec.rb

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@
2828

2929
describe ".icons" do
3030
it "puts create icon onto the icons" do
31-
expect(described_class.icons[:create][0]).to eq "image/png"
32-
expect(
33-
described_class.icons[:create][1]
34-
).to eq ErrbitGithubPlugin.read_static_file("github_create.png")
31+
expect(described_class.icons[:create][0]).to eq("image/png")
32+
33+
expect(described_class.icons[:create][1])
34+
.to eq(ErrbitGithubPlugin.read_static_file("github_create.png"))
3535
end
3636

3737
it "puts goto icon onto the icons" do
38-
expect(described_class.icons[:goto][0]).to eq "image/png"
39-
expect(
40-
described_class.icons[:goto][1]
41-
).to eq ErrbitGithubPlugin.read_static_file("github_goto.png")
38+
expect(described_class.icons[:goto][0]).to eq("image/png")
39+
40+
expect(described_class.icons[:goto][1])
41+
.to eq(ErrbitGithubPlugin.read_static_file("github_goto.png"))
4242
end
4343

4444
it "puts inactive icon onto the icons" do
45-
expect(described_class.icons[:inactive][0]).to eq "image/png"
46-
expect(
47-
described_class.icons[:inactive][1]
48-
).to eq ErrbitGithubPlugin.read_static_file("github_inactive.png")
45+
expect(described_class.icons[:inactive][0]).to eq("image/png")
46+
47+
expect(described_class.icons[:inactive][1])
48+
.to eq(ErrbitGithubPlugin.read_static_file("github_inactive.png"))
4949
end
5050
end
5151

@@ -54,24 +54,28 @@
5454
describe "#configured?" do
5555
context "with errors" do
5656
let(:options) { {invalid_key: ""} }
57+
5758
it "return false" do
58-
expect(tracker.configured?).to eq false
59+
expect(tracker.configured?).to eq(false)
5960
end
6061
end
62+
6163
context "without errors" do
6264
let(:options) do
6365
{username: "foo", password: "bar", github_repo: "user/repository"}
6466
end
67+
6568
it "return true" do
66-
expect(tracker.configured?).to eq true
69+
expect(tracker.configured?).to eq(true)
6770
end
6871
end
6972
end
7073

7174
describe "#url" do
72-
let(:options) { {github_repo: "repo"} }
75+
let(:options) { {github_repo: "user/repo"} }
76+
7377
it "returns issues url" do
74-
expect(tracker.url).to eq "https://github.com/repo/issues"
78+
expect(tracker.url).to eq("https://github.com/user/repo/issues")
7579
end
7680
end
7781

@@ -87,12 +91,15 @@
8791
end
8892
it { is_expected.not_to be_empty }
8993
end
94+
9095
context "without github_repo" do
9196
let(:options) do
9297
{username: "foo", password: "bar", github_repo: ""}
9398
end
99+
94100
it { is_expected.not_to be_empty }
95101
end
102+
96103
context "with completed options" do
97104
let(:options) do
98105
{username: "foo", password: "bar", github_repo: "repo"}
@@ -170,4 +177,18 @@
170177
end
171178
end
172179
end
180+
181+
describe "#close_issue" do
182+
context "signed in with token" do
183+
let(:user) do
184+
{
185+
"github_login" => "bob",
186+
"github_oauth_token" => "valid_token"
187+
}
188+
end
189+
190+
191+
192+
end
193+
end
173194
end

0 commit comments

Comments
 (0)