spec/octopolo/github/label_spec.rb in octopolo-0.1.1 vs spec/octopolo/github/label_spec.rb in octopolo-0.1.2
- old
+ new
@@ -32,16 +32,16 @@
end
end
context "#first_or_create" do
it "finds the existing label and doesn't do anything" do
- allow(Label).to receive(:all).and_return([label1,label2])
+ allow(Label).to receive(:all_from_repo).and_return([label1,label2])
expect(GitHub).not_to receive(:add_label)
Label.first_or_create(label1)
end
it "doesn't find a label and creates one" do
- allow(Label).to receive(:all).and_return([label1,label2])
+ allow(Label).to receive(:all_from_repo).and_return([label1,label2])
expect(GitHub).to receive(:add_label).with(config.github_repo, "medium-risk", "454545")
Label.first_or_create(Label.new(name: "medium-risk", color: "454545"))
end
end