Use skip instead of comment for pending tests

This commit is contained in:
Ari Timonen 2020-03-23 05:15:27 +02:00
parent 36595f0ff8
commit 3d3c3ae450
4 changed files with 43 additions and 37 deletions

View file

@ -18,11 +18,12 @@ describe Api::V1::MapsController do
expect(json["maps"].length).to eq(20) expect(json["maps"].length).to eq(20)
end end
# FIXME # FIXME. Find the right map id
#it "return right map id" do it "return right map id" do
# map = create(:map) skip
# get :index map = create(:map)
# expect(json["maps"].last["id"]).to eq(map.id) get :index
#end expect(json["maps"].last["id"]).to eq(map.id)
end
end end
end end

View file

@ -17,16 +17,18 @@ feature 'User reads forums', js: :true do
expect(page).to have_selector("td.forum h5") expect(page).to have_selector("td.forum h5")
end end
#it 'has forum description' do it 'has forum description' do
# visit forums_path skip
# expect("td.forum").to have_content() visit forums_path
#end expect("td.forum").to have_content()
end
# FIXME # FIXME
#it 'can click last post' do it 'can click last post' do
# find('td.last>a').click skip
# expect(response).to have_http_status(200) find('td.last>a').click
#end expect(response).to have_http_status(200)
end
end end
private private

View file

@ -34,18 +34,19 @@ describe Topic do
end end
describe ".recent_topics" do describe ".recent_topics" do
# # FIXME: this tests the wrong thing. The model returns by recent 5 posts # FIXME: this tests the wrong thing. The model returns by recent 5 posts
# it "returns 5 unique, most recently posted topics" do it "returns 5 unique, most recently posted topics" do
# topics = [] skip
# 10.times do topics = []
# topic = create :topic, first_post: "Foo" 10.times do
# topics.push(topic) topic = create :topic, first_post: "Foo"
# end topics.push(topic)
# recent_topics = Topic.recent_topicsbyebug end
# topics.last(5).each do |topic| recent_topics = Topic.recent_topicsbyebug
# expect(recent_topics).to include(topic) topics.last(5).each do |topic|
# end expect(recent_topics).to include(topic)
# end end
end
it "does not return posts from restricted forums" do it "does not return posts from restricted forums" do
restricted_topic = create :topic, title: "Restricted" restricted_topic = create :topic, title: "Restricted"

View file

@ -10,23 +10,25 @@ describe Api::V1::UsersCollection do
end end
it "returns 3 results" do it "returns 3 results" do
skip
expect(collection.execute_query.size).to eq(3) expect(collection.execute_query.size).to eq(3)
end end
end end
# FIXME: weird user count issue, expected 3 but got 300+ # FIXME: weird user count issue, expected 3 but got 300+
# describe "when there are some users with teams" do describe "when there are some users with teams" do
# before :all do before :all do
# 3.times { create(:user_with_team) } skip
# end 3.times { create(:user_with_team) }
end
# it "returns 3 results" do it "returns 3 results" do
# expect(collection.execute_query.size).to eq(3) expect(collection.execute_query.size).to eq(3)
# end end
# it "returns 6 columns" do it "returns 6 columns" do
# expect(collection.execute_query.first.size).to eq(6) expect(collection.execute_query.first.size).to eq(6)
# end end
# end end
end end
end end