Move create test into a describe block
This commit is contained in:
parent
0f01177c67
commit
f80d4ce935
|
@ -3,6 +3,9 @@
|
|||
require "rails_helper"
|
||||
|
||||
describe ServicesController, type: :controller do
|
||||
describe "#create" do
|
||||
subject { get :create, params: { provider: "twitter" } }
|
||||
|
||||
context "successful Twitter sign in" do
|
||||
let(:user) { FactoryBot.create(:user) }
|
||||
|
||||
|
@ -22,8 +25,6 @@ describe ServicesController, type: :controller do
|
|||
OmniAuth.config.mock_auth[:twitter] = nil
|
||||
end
|
||||
|
||||
subject { get :create, params: { provider: "twitter" } }
|
||||
|
||||
context "no services connected" do
|
||||
it "creates a service integration" do
|
||||
expect { subject }.to change { Service.count }.by(1)
|
||||
|
@ -40,8 +41,9 @@ describe ServicesController, type: :controller do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "#update" do
|
||||
describe "#update" do
|
||||
subject { patch :update, params: }
|
||||
|
||||
context "not signed in" do
|
||||
|
|
Loading…
Reference in New Issue