Add tests for new instance variables in TimelineController
This commit is contained in:
parent
14199059b4
commit
86869dc993
|
@ -92,6 +92,11 @@ describe TimelineController do
|
||||||
|
|
||||||
it { should have_http_status(200) }
|
it { should have_http_status(200) }
|
||||||
it_behaves_like "paginates", :followed_user_answers
|
it_behaves_like "paginates", :followed_user_answers
|
||||||
|
|
||||||
|
it "assigns all lists to an instance variable" do
|
||||||
|
subject
|
||||||
|
expect(assigns(:lists)).to eq(user.lists)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#list" do
|
describe "#list" do
|
||||||
|
@ -108,6 +113,11 @@ describe TimelineController do
|
||||||
subject
|
subject
|
||||||
expect(assigns(:list)).to eq(list)
|
expect(assigns(:list)).to eq(list)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "excludes the current selected list from the list of lists" do
|
||||||
|
subject
|
||||||
|
expect(assigns(:lists)).not_to include(list)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue