Comments (7)
slug を入力しないカテゴリを複数作成できないです。
from lokka.
パッチを作成しました。
テストしてみてください: https://github.com/komagata/lokka/pull/142
The cause was that the POSTed slug
is "" when no slug is specified.
Category model had unique constraint for slug
and title
, therefore @category.save
failed.
In Entry model, uniqueness is ensured with dm-validations
, and it does not use DB constraint.
I follow the way.
from lokka.
Looks like CI failed.
http://travis-ci.org/#!/komagata/lokka/jobs/596760
from lokka.
CI still fails against Postgres.
http://travis-ci.org/#!/komagata/lokka/builds/613447
That is because spec_seeds.rb
specifies :id
of Category's first instance apparently,
Category.create(:id => 1,
:title => 'Test Category',
:created_at => created_at,
:updated_at => updated_at)
but my category_spec.rb
does not.
The main cause is that datamapper does not update categories_id_seq
when :id
is specified.
(Simple test: https://gist.github.com/1726651)
I did not specify :id
because it is not specified when created in application.
Therefore, I'm not happy with the idea that create all Category items with :id
in that unit test.
However, I know that controlling :id
is important for integration tests. So it could be the only possible solution.
By the way, I disagree with using the same fixture between all test, because it makes implicit dependency between tests like this.
How can we work around this problem? Tell me your idea!
from lokka.
Oh I see.
I think so too. I don't want to use :id and fixture.
It's no probrem that fixture will replace with "fixture replacement library".
from lokka.
Now CI passes.
@johnny-miyake , thank you for reporting problem.
@komagata , thank you for kind advice.
from lokka.
omg! CI is back! thanks @tomykaira
from lokka.
Related Issues (20)
- bundle lokka-theme_helper_loader HOT 3
- Path including :id should return 404 if the item does not found
- notfound handler should not raise error
- Unable to post comment when custom permalink is on. HOT 1
- Custom permalink feature is broken if entry date is end of month HOT 1
- User.random_string never contain '9' HOT 1
- Error occurs when I try to install it on Windows HOT 1
- Adding suffix " "(a blank) slug, cannot access post permalink HOT 2
- Lokka doesn't run with sqlite after commit 9431b82 HOT 6
- Mistake on testdata for Post.markup? HOT 2
- Description for per post. HOT 1
- Lokka Plugin を集めたリポジトリを作りたい HOT 3
- Plain HTML editor is broken HOT 2
- Dockerfile HOT 1
- Stop using DataMapper, maybe migrate to ActiveRecord
- Slack workspace HOT 2
- published_at column
- Add indexes to columns used for sorting records
- Can not deploy to Heroku
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lokka.